On Sat, Jun 16, 2001 at 08:00:04PM -0500, Dan Nelson wrote:
> In the last episode (Jun 16), Jeremy Zawodny said:
> > Err, I forgot to mention that there's a "Using filesort" in the
> > output as well. That makes me believe it wants to write to disk (even
> > if there may be sufficient RAM).
> 
> I'm not sure "Using filesort" actually means it is going to create a
> file.  The code seems to print "filesort" whenever an ORDER BY is
> requested (sql_select.cc:536).  Even the manual simply says "extra
> pass".  Maybe it required a file-based table in an earlier version,
> but not anymore?

Based on testing, I've found that "Using filesort" appears only when
the number of records to be sorted is sufficiently high. The sort
order (asc/desc) doesn't matter. But take a "Using filesort" query,
put a "LIMIT 10" on the end of it and see if it goes away. It does for
me.

Hmmm...

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878    Fax: (408) 349-5454    Cell: (408) 439-9951

MySQL 3.23.29: up 0 days, processed 3,996,185 queries (50/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to