From: | Greg Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: statistics horribly broken for row-wise comparison |
Date: | 2009-03-03 08:04:39 |
Message-ID: | 4136ffa0903030004k573c6156i57890320b3745006@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 3, 2009 at 3:33 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2009-03-03 08:22:30 | Re: Hot standby, running xacts, subtransactions |
Previous Message | Heikki Linnakangas | 2009-03-03 07:58:40 | Re: Why do we keep UnusedLock1 in LWLockId? |