Re: limit clause produces wrong query plan - Mailing list pgsql-performance

From Andrus
Subject Re: limit clause produces wrong query plan
Date
Msg-id gget6m$24rv$1@news.hub.org
Whole thread Raw
In response to limit clause produces wrong query plan  ("Andrus" <kobruleht2@hot.ee>)
Responses Re: limit clause produces wrong query plan
List pgsql-performance
> it was veery fast. To be honest I do not know what is happening?!

This is really weird.
It seems that PostgreSql OFFSET / LIMIT are not optimized and thus typical
paging queries

SELECT ... FROM bigtable ORDER BY intprimarykey OFFSET pageno*100 LIMIT 100

or even first page query

SELECT ... FROM bigtable ORDER BY intprimarykey OFFSET 0 LIMIT 100

cannot be used in PostgreSql at all for big tables.

Do you have any idea how to fix this ?

Andrus.


pgsql-performance by date:

Previous
From: Kevin Kempter
Date:
Subject: Monitoring buffercache...
Next
From: "Scott Marlowe"
Date:
Subject: Re: limit clause produces wrong query plan