PHP developer’s shortcut for optimizing mysql
July 21st, 2007 by Aaron
PHP developers, raise your hand if you run an explain on each MySQL statement you write and use in your apps! Anyone? Ok… 1… 2… thats it? Yah, I tend to forget that too, but luckily PHP allows us to cheat. Thanks PHP!
The ini directive mysql.trace_mode will generate errors on unoptimized mysql queries (ie, table scans, etc) . Combined with my new error monitoring eclipse tool, this has been saving me tons of time. It won’t solve your issue or run an explain, but it will tell you if mysql is reporting an issue with your query. Of course, you’d NEVER turn this on for production. heh.
This entry was posted on Saturday, July 21st, 2007 at 1:33 pm and is filed under PHP • SQL. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.














