Re: statistics horribly broken for row-wise comparison - Mailing list pgsql-hackers

From Greg Stark
Subject Re: statistics horribly broken for row-wise comparison
Date
Msg-id 4136ffa0903030004k573c6156i57890320b3745006@mail.gmail.com
Whole thread Raw
In response to Re: statistics horribly broken for row-wise comparison  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Mar 3, 2009 at 3:33 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Because it would be the wrong answer, except in the uncommon case where
> the field values are completely independent (at least, I would expect
> that to be uncommon when people have multicolumn indexes on them).


Actually I think it's *more* likely to be true for multicolumn
indexes. If the two columns were correlated then you wouldn't need the
multicolumn index since you could just use one of the columns alone.
The case where people create multicolumn indexes btree indexes is
usually when they have a "major"-"minor" relationship between the two
columns so for each value of the major key there is a whole range of
minor keys.

Sure multi-column statistics would be nice though.

-- 
greg


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Why do we keep UnusedLock1 in LWLockId?
Next
From: Simon Riggs
Date:
Subject: Re: Hot standby, running xacts, subtransactions