pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: alex@neteconomist.com
Cc: Andrei Bintintan <klodoma@ar-sd.net>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: [SQL] OFFSET impact on Performance???
Date: Thu, 20 Jan 2005 16:53:14 +0000
Message-ID: <41EFE1FA.60004@archonet.com> (raw)
In-Reply-To: <33c6269f05012008391490448b@mail.gmail.com>
References: <019f01c4fee1$1b58d600$0b00a8c0@forge>
	<41EF9FD3.5020400@archonet.com>
	<020d01c4fef6$595bb9d0$0b00a8c0@forge>
	<41EFCC5B.5010302@archonet.com>
	<33c6269f05012008391490448b@mail.gmail.com>

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



view thread (22+ messages)  latest in thread

Message-ID: <41EFE1FA.60004@archonet.com>
Permalink:  ../41EFE1FA.60004@archonet.com/
Also on:    postgresql.org/message-id/41EFE1FA.60004@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, alex@neteconomist.com, klodoma@ar-sd.net, pgsql-performance@postgresql.org
  Subject: Re: [SQL] OFFSET impact on Performance???
  In-Reply-To: <41EFE1FA.60004@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox