Re: Weird indices - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Weird indices
Date
Msg-id Pine.BSF.4.21.0102201759190.5329-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Weird indices  (Joseph Shraibman <jks@selectacast.net>)
List pgsql-general
On Tue, 20 Feb 2001, Joseph Shraibman wrote:

> Err I wan't complaing about count(*) per se, I was just using that as a
> simple example of something that should be done with an index.  Because
> if the index doesn't have to worry about rows that aren't current then
> you don't even have to go into the heap because the index alone should
> have enough information to do that.  If it doesn't have to worry about
> rows that aren't visible.

But the problem is how do you deal with concurrency?  At any given point
in time there are different sets of rows that are "current" for different
transactions.  They all need to be in the index so that index scans work
for those transactions (unless you were to do something hacky to get
around it) but not all of them are valid for each transaction, you still
have to get that information somehow. You can keep the transaction
information in the index but I know Tom's talked this idea down in the
past (it's come up on hackers before), I don't really remember what the
full arguments were both ways.


pgsql-general by date:

Previous
From: Ian Lance Taylor
Date:
Subject: Re: Weird indices
Next
From: Richard Lynch
Date:
Subject: pg_shadow.passwd versus pg_hba.conf password passwd