From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Ioannis Theoharis <theohari(at)ics(dot)forth(dot)gr>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: About Access paths |
Date: | 2005-03-07 00:03:41 |
Message-ID: | 7470.1110153821@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> If someone wants to step up and write the code, well... Bit hard, it
> means that everytime a row is updated the index needs to be updated
> too, gotta get all the corner cases, locking, etc.
Even if someone did step up and write the code, the patch would probably
be rejected. Copying row commit data into index entries would have some
serious negative effects:
* Index bloat. It would add probably 20 bytes to the size of an index
entry, which is a lot (it would double the size of an index on a simple
integer column, for instance).
* Extra time and extra I/O to update these additional copies. Not only
do we have to write the index changes themselves, but we'd have to make
WAL log entries about each one (since the WAL replay environment is not
nearly bright enough to find index entries for itself). That's
expensive.
The second point makes any such change a sure loser for an update-heavy
database. In a nearly-read-only database, it might possibly be a
winner, but in view of the index bloat problem it's not a sure thing
even then.
In short: this has been discussed and rejected before. Many times.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2005-03-07 01:04:20 | Re: Error: "catalog is missing 8 attribute(s) for relid 16683" |
Previous Message | Martijn van Oosterhout | 2005-03-06 22:14:37 | Re: About Access paths |