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

Re: Serious performance problem

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Antonio Fiol Bonnín <fiol(at)w3ping(dot)com>
Cc: Brent Verner <brent(at)rcfile(dot)org>, "Tille, Andreas" <TilleA(at)rki(dot)de>, "Claus, Hermann" <ClausH(at)rki(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Serious performance problem
Date: 2001-10-30 15:24:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, 30 Oct 2001, Antonio Fiol [iso-8859-1] Bonnn wrote:

> > | > Seems that problem is very simple :))
> > | > MSSql can do queries from indexes, without using actual table at all.
> > | > Postgresql doesn't.
> > | >
> > | > So mssql avoids sequental scanning of big table, and simply does scan of
> > | > index which is already in needed order and has very much less size.
> > | The consequence for my problem is now:  If it is technically possible
> > | to implement index scans without table lookups please implement it.  If
The feature you are looking for is called 'index coverage'. Unfortunately,
it is not easy to implement with Postgresql, and it is one of few
outstanding 'nasties'. The reason you can't do it is follows: Postgres
uses MVCC, and stores 'when' the tuple is alive inside the tuple. So, even
if index contains all the information you need, you still need to access
main table to check if the tuple is valid. 

Possible workaround: store tuple validity in index, that way, a lot more
space is wasted (16 more bytes/tuple/index), and you will need to update
all indices when the base table is updated, even if indexed information
have not changed.

Fundamentally, this may be necessary anyway, to make index handlers aware
of transactions and tuple validity (currently, if you have unique index,
you may have conflicts when different transactions attempt to insert
conflicting data, _at the time of insert, not at time of commit_).


In response to


pgsql-hackers by date

Next:From: Tille, AndreasDate: 2001-10-30 16:13:46
Subject: Re: Serious performance problem
Previous:From: Vince VielhaberDate: 2001-10-30 15:12:39
Subject: Re: pgsql-committers?

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