On Sat, Dec 27, 2008 at 12:38 PM, Jake Maul <jakemaul@stripped> wrote:
>
> 3) Obviously it'd probably be faster if you weren't using
> SQL_NO_CACHE... guessing you just did that to show us what it's like
> that way?
>
>
Why would SQL_NO_CACHE slow it down? By not checking the cache or storing
the resultset into cache it should be quicker, at least a little bit.
Unless, of course, the query would always return the same result set. But
with count(*) in there it might not. In fact, I believe the count(*) would
prevent MySQL from caching the query in the first place, like using now() -
it's a non-deterministic function.
--
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com