

10 tips for optimizing mySql queries - socratees
http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/

======
jrockway
_SQL is Not C <example code>_

I would be very surprised if the optimizer did not treat his two example
queries the same.

~~~
iigs
In the earliest versions of MySQL that supported subqueries IIRC you could see
different EXPLAINs for what, to me, appeared to be equivalent queries. That is
to say, I don't believe the query optimizer is/was MySQL's key feature at that
time.

Then again, it wasn't that long ago (2003) that MySQL 4.0 came out. Before
that the subquery format was a syntax error. :/

------
bradgessler
_COUNT() incurs no additional cost for a well-structured query_

"Well structured" query meaning there is no WHERE clause...

------
truebosko
Nothing like trying to read an article on mySQL optimization and I get "Error
establishing database connection" .. :(

~~~
jfarmer
I guess I deserved that...heh.

My WordPress cache plugin got disabled in one of the many upgrades. Instead of
serving 400 requests per second my server was serving less than 1.

Man, WordPress performance sucks...

