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

Re: [SQL] OFFSET impact on Performance???

From: Richard Huxton <dev(at)archonet(dot)com>
To: alex(at)neteconomist(dot)com
Cc: Andrei Bintintan <klodoma(at)ar-sd(dot)net>, pgsql-sql(at)postgresql(dot)org,pgsql-performance(at)postgresql(dot)org
Subject: Re: [SQL] OFFSET impact on Performance???
Date: 2005-01-20 16:53:14
Message-ID: 41EFE1FA.60004@archonet.com (view raw or flat)
Thread:
Lists: pgsql-performancepgsql-sql
Alex Turner wrote:
> I am also very interesting in this very question.. Is there any way
> to declare a persistant cursor that remains open between pg sessions?

Not sure how this would work. What do you do with multiple connections? 
Only one can access the cursor, so which should it be?

>  This would be better than a temp table because you would not have to
>  do the initial select and insert into a fresh table and incur those
> IO costs, which are often very heavy, and the reason why one would
> want to use a cursor.

I'm pretty sure two things mean there's less difference than you might 
expect:
1. Temp tables don't fsync
2. A cursor will spill to disk beyond a certain size

--
   Richard Huxton
   Archonet Ltd

In response to

pgsql-performance by date

Next:From: Holger HoffstaetteDate: 2005-01-20 16:55:56
Subject: Re: PostgreSQL clustering VS MySQL clustering
Previous:From: Randolf RichardsonDate: 2005-01-20 16:49:55
Subject: Re: PostgreSQL vs. Oracle vs. Microsoft

pgsql-sql by date

Next:From: Greg StarkDate: 2005-01-20 16:59:34
Subject: Re: [SQL] OFFSET impact on Performance???
Previous:From: Ron MayerDate: 2005-01-20 16:49:39
Subject: Re: [SQL] OFFSET impact on Performance???

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