If all you want is the first page, then simply use SELECT ... LIMIT n,
which will only return the first n rows of the set.  To "page through"
data, use LIMIT offset, n, which will return n rows starting at offset
rows into the dataset.  Note that doing this on a changing table will
give results that may not be useful, like skipped or duplicated rows
between "pages".

james montebello

On Fri, 11 Jan 2002, Bret Ewin wrote:

> My system tends to generate large result sets, with the first page of
> results being used and the rest thrown away. I expect this is typical in
> other systems as well. I've noticed the JDBC driver retrieves the entire
> result set before letting the application iterate over any results.  I'm not
> sure if this is a limitation in the database or the driver.
> 
> Oracle has the capability to start returning results as they are generated.
> Does MySQL have something similar? If not, is there anything I can do to
> alleviate this behavior?
> 
> Thanks,
> Bret
> 
> 
> ---------------------------------------------------------------------
> 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
> 


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