On 6/27/08, Bill Thoen <[EMAIL PROTECTED]> wrote:
>
> What I want to do is present the results of a query in a web page, but only
> 10 rows at a time. My PostgreSQL table has millions of records and if I
> don't add a LIMIT 10 to the SQL selection, the request can take too long.
> The worst case scenario is when the user requests all records without adding
> filtering conditions (e.g. SELECT * FROM MyTable;)  That can take 10-15
> minutes, which won't work on a web application.
>
>
Also note, that huge OFFSET value can slow down the query as much as if you
weren't using LIMIT at all.

-- 
Sincerely yours,
Olexandr Melnyk <><
http://omelnyk.net/

Reply via email to