Re: Serious performance problem
Denis Perchine <dyp@perchine.com>
From: Denis Perchine <dyp@perchine.com>
To: Alex Pilosov <alex@pilosoft.com>, Antonio Fiol Bonn?n <fiol@w3ping.com>
Cc: Brent Verner <brent@rcfile.org>, "Tille, Andreas" <TilleA@rki.de>, "Claus, Hermann" <ClausH@rki.de>, pgsql-hackers@postgresql.org
Date: 2001-10-31T18:26:10Z
Lists: pgsql-hackers
On Tuesday 30 October 2001 21:24, Alex Pilosov wrote: > > > | 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. What is the problem to implement this index as a special index type for people who need this? Just add a flag keyword to index creation clause. Actually I would like to hear Tom's opinion on this issue. This issue is of my interest too. Also I saw sometime ago in hackers that there is a patch implementing this... Or I am wrong here? -- Denis