> On Wed, Apr 04, 2001 at 05:35:52PM -0600, Mat Murdock wrote:
> >    If I understand the manual correctly when I do a  "select blah from blah where 
>blah = blah order by blah limit 10"  Mysql finds the first 10 matching records and 
>then sorts those records.  How do I have it first sort the database and then take the 
>first 10 records?
> > 
> 
> LIMIT is applied after sorting.  It does what you want already.

As a matter of interest, if I have 10 million rows and specify :

"select * from Table order by epoch limit 10;"

Will all 10 million rows be sorted and the first 10 taken, or will
the sort be "truncated" so that only the matching 10 rows are
maitained during the trawl through the table?

Paul Wilson
iiNet Ltd

---------------------------------------------------------------------
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