Skip site navigation (1) Skip section navigation (2)

Re: limit clause produces wrong query plan

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: limit clause produces wrong query plan
Date: 2008-11-24 17:26:22
Message-ID: gget6m$24rv$1@news.hub.org (view raw or flat)
Thread:
Lists: 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. 


In response to

Responses

pgsql-performance by date

Next:From: Kevin KempterDate: 2008-11-24 18:43:56
Subject: Monitoring buffercache...
Previous:From: PFCDate: 2008-11-24 16:56:31
Subject: Re: Perc 3 DC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group