Hello, At Tuesday 16 August 2011 23:12:09 DaB. wrote:
So now I (and others, I suspect) are inserting /* SLOW_OK */ into queries. That doesn't make the queries less or faster, but it returns service to normal (for the tool writers, and the tool users). German speakers might be familiar with the phrase "wenn's denn der Wahrheitsfindung dient..."
of corse I considered that users will start inserting SLOW_OK just everywhere before I re-wrote the killer. Let me tell you why that is not so bad as it seems: Most user will not do this because their queries are executed fast enough already (and so the killer ignores them). Some users will add a SLOW_OK, but set a LIMIT: too (that is ok, because the ideas behind SLOW_OK is that users say "I know that will runs longer"). Some user will just add a SLOW_OK because they know that the queries will run for longer (that's ok too). Only very few users will add SLOW_OK to queries which could run fast; and these few queries I can kill manualy and then write angry mails to the users.
The query-killer should kill 3 types of queries: -Queries which have a LIMIT: and have run too long, -Queries which run normaly very fast, but for some reason not this time (like an editcounter which works fast for people with low and middle editcounts, but fails for a bot with 100,000 edits) -Queries of users who do not think.
If you know that a query will run for longer (because it is complex, because it will return many rows, or something else), then add SLOW_OK (and a LIMIT: if you can) and everything is fine! If you know that the query should run fast, then please set a LIMIT: and look for it if you get too many emails, because something is wrong then.
I guess most times (when the replag is low) most users will get no eMails at all (1h is a long time).
Sincerly, DaB.
P.S: And yes, I can understand if somebody is angry if his/her query is killed. But please try to understand my side too.