Re: Much Ado About COUNT(*)

Christopher Kings-Lynne <chriskl@familyhealth.com.au>

From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "Jonah H. Harris" <jharris@tvi.edu>, pgsql-hackers@postgresql.org
Date: 2005-01-13T10:12:49Z
Lists: pgsql-hackers
> The fundamental problem is that you can't do it without adding at least
> 16 bytes, probably 20, to the size of an index tuple header.  That would
> double the physical size of an index on a simple column (eg an integer
> or timestamp).  The extra I/O costs and extra maintenance costs are
> unattractive to say the least.  And it takes away some of the
> justification for the whole thing, which is that reading an index is
> much cheaper than reading the main table.  That's only true if the index
> is much smaller than the main table ...

Well, the trick would be to have it specified per-index, then it's up to 
the user whether it's faster or not...