Re: SELECT * FROM LIMIT 1; is really slow - Mailing list pgsql-hackers
From Alvaro Herrera
Subject Re: SELECT * FROM LIMIT 1; is really slow
Date
Msg-id 20040528193615.GE2343@dcc.uchile.cl
Whole thread Raw
In response to Re: SELECT * FROM LIMIT 1; is really slow  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, May 28, 2004 at 03:19:29PM -0400, Tom Lane wrote:

> We'd still need a plain CommandCounterIncrement facility, which means
> that actually a subtransaction would have to be a group of CIDs not just
> one.

Right, this is why I suggested runlength (the group is contiguous).

> So there'd also need to be a data structure showing the CIDs
> associated with each open subtransaction --- this is what you'd
> consult to go and set the "aborted" bits if the subxact rolls back.

Right.  We only need to store the "borders" though.  Not even that: only
the start, because the end is what is current at AbortSubTransaction()
time.

I'll try this.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El miedo atento y previsor es la madre de la seguridad" (E. Burke)



pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: Win32, PITR, nested transactions, tablespaces
Next
From: "Merlin Moncure"
Date:
Subject: select like...not using index