logo

Pages


Erick’s Games

Faith

Older Games

Other Blogs

Posts

Categories

 

July 2008
S M T W T F S
« Jun   Aug »
 12345
6789101112
13141516171819
20212223242526
2728293031  



Comments

Administration

Thank you Erick…
Naughty Supermarket Walkthrough

Why is the word EXPLAIN in front of every MySQL query in SHOW PROCESSLIST?

July 4, 2008

So, I do a SHOW PROCESSLIST command in phpMyAdmin, and it shows a ton of SELECT statements that have EXPLAIN in front of every one of them!  Now, I never even heard of the EXPLAIN keyword, so I certainly didn’t do it.

It took me a couple hours to figure out, but PHP was putting it there.  I had turned mysql.trace_mode = On because the comments said it would give me warnings to table/index scans.  It did give me a couple warnings where I didn’t call mysql_free_result(), so I was happy with it.  But apparently it also added EXPLAIN to all SELECT statements in order to get some data out of that.  Well, I don’t want to slow down the database, so I turned that off.  Good to know it’s there I guess, and exactly what it does.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Technorati

Leave a Reply

Google