Monday, September 18, 2006
Poor Little Database
			  You'd think I would learn about sub-selects in MySQL. I just paralyzed our production database for 10 minutes with this query:
			  
			
 
  
select PROVIDER_ID from SAKAI_REALM where REALM_ID  in (select CONCAT('/site/', SITE_ID) from SAKAI_SITE_TOOL where REGISTRATION = 'sakai.assignment');
I didn't realize anything was wrong until my instant messenger started lighting up like a switchboard.
I used show processlist and killed the offending query. This is yet more evidence that a software engineer should not be permitted to touch the database. On the other hand, why should I be able to cripple our application with a query that MySQL doesn't happen to like?

