Re: A thought on Index Organized Tables - Mailing list pgsql-hackers

From Robert Haas
Subject Re: A thought on Index Organized Tables
Date
Msg-id 603c8f071002240701y6ece3358h1ced7f8c0d1a8db@mail.gmail.com
Whole thread Raw
In response to Re: A thought on Index Organized Tables  (Gokulakannan Somasundaram <gokul007@gmail.com>)
Responses Re: A thought on Index Organized Tables  (Gokulakannan Somasundaram <gokul007@gmail.com>)
List pgsql-hackers
On Wed, Feb 24, 2010 at 9:41 AM, Gokulakannan Somasundaram
<gokul007@gmail.com> wrote:
>>
>> If you have a scenario where the visibility map incurs a measurable
>> overhead, let's hear it. I didn't see any in the tests I performed, but
>> it's certainly possible that if the circumstances are just right it
>> makes a difference.
>>
> Heikki,
>           The obvious one, i could observe is that it would increase the WAL
> contention. Am i missing something?  All i am suggesting is to reduce the
> unnecessary work required in those tables, where the visibility map is not
> required. For example, in data warehouses, people might even have a tables
> without any indexes. Why do we ask them to incur the overhead of visibility
> map?

I think you're a barking up the wrong tree.  AFAIUI, the need for the
visibility map has not very much to do with whether the table has
indices, and everything to do with avoiding unnecessary VACUUMs.  In
any event, you've not shown that the visibility map HAS any overhead,
so talking about skipping it seems entirely premature.  Keep in mind
that the visibility map is quite small.

The point of the visibility map as far as index-only scans are
concerned is that if all the needed column values can be extracted
from the index, we still need to read the heap page to check tuple
visibility - unless, of course, we already know from the visibility
map that all the tuples on that heap page are guaranteed to be visible
to all transactions.  On a read-only or read-mostly table, this will
reduce the cost of checking tuple visibility by several orders of
magnitude.

...Robert


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Un-break pg_dump for the case of zero-column tables.
Next
From: Tom Lane
Date:
Subject: Re: A thought on Index Organized Tables