[Wikipedia-l] Sysop SQL queries disabled

Brion Vibber brion at pobox.com
Mon Jan 26 21:44:16 UTC 2004


Somebody on nl.wikipedia.org ran this query:

SELECT user_name, COUNT(*) FROM user, cur, old WHERE 
user_name=old_user_text OR user_name=cur_user_text GROUP BY user_id 
ORDER BY user_id DESC LIMIT 20

This ran for about 90 minutes before I caught and killed it, and froze 
up the entire database in the meantime.

For those not familiar with SQL, the above query will take _every 
single_ article and cross-reference it against _every single_ stored 
old revision. It will then sort these _many millions_ of rows by user 
id and return the first 20. (Obviously that's not the intent, but 
that's how the database interprets the request.)

Sysop SQL queries on the database are now disabled. If people have an 
urgent need to perform queries and know what they're doing, we may be 
able to open up access on an individual basis, but please be aware that 
SQL offers many ways to shoot yourself in the foot. Allowing this 
access at all is a foolish thing that we do in the spirit of openness 
(like letting anyone edit our website ;) but we can't afford to have 
the site go down whenever somebody makes a typo.

-- brion vibber (brion @ pobox.com)




More information about the Wikipedia-l mailing list