All of us are very good in writing good queries, we know that ;)
but sometimes a bad query may escape our control and hit (badly)
our database.
There is also that probie, who just join the company and is
writing all his code with SELECT * and no WHERE.
We have told him millions of time that doing this is bad, but he
seems not listening.
Ah the other day we had another code injection that developers
will take some time to fix, and that take them some time to
isolate the part of the code sending the killing query to our
database.
All the above are true stories, things that happen every day in
at least few environments.
The main problem in that case is not to isolate the bad query,
that is something that we can do very fast, but to identify the
code that is generating it and disable that part of the code
without killing the whole application.
That part can takes days. …
[Read more]