Re: Indexed views? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Indexed views?
Date
Msg-id 20040908015130.GA7556@dcc.uchile.cl
Whole thread Raw
In response to Re: Indexed views?  (Doug McNaught <doug@mcnaught.org>)
Responses Re: Indexed views?  (Doug McNaught <doug@mcnaught.org>)
List pgsql-hackers
On Tue, Sep 07, 2004 at 07:58:56PM -0400, Doug McNaught wrote:
> Tiago Wright <tiagowright@gmail.com> writes:

> > Yes, thanks Tom. This is precisely what I was missing. I searched the
> > archives for the reason why this is so, but I found only one message
> > mentioning the MVCC mechanism. Can you point me in the right
> > direction? I would like to understand the issue.
> 
> > IMHO, a change in this area could deliver great performance improvements.
> 
> Hard to say how it would work, but come up with a good design and
> quality patch and it'll probably go in.  :)

Probably not.  This has been discussed before; what's needed is that the
visibility information is stored also in the index.  This is hard and
inefficient to do, because it requires updating the index at the same
time that the heap is updated.  Which is a bad proposition as soon as
there is more than one index, and when there is a seqscan involved (i.e.
no index), because it means a lot of extra I/O.


A proposal that would be better received would be to implement "bitmap
scanning" of indexes, which could mean retrieving heap pages in order,
yielding much better performance.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
We take risks not to escape from life, but to prevent life escaping from us.



pgsql-hackers by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Indexed views?
Next
From: Tom Lane
Date:
Subject: Re: Making AFTER triggers act properly in PL functions