From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Adam Gundy <adam(at)starsilk(dot)net> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: varchar index joins not working? |
Date: | 2008-04-14 17:54:20 |
Message-ID: | 48039A4C.2000304@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Adam Gundy wrote:
> I doubt we could get stats stable enough for this. the number of groups
> will hopefully be much larger at some point.
The pg_stats table should be recording the n most-common values, so if
you have 1 million groups you track details of the 1000 most-common.
That gives you a maximum for how common any value not in the stats can be.
>> No, but let's see what's in pg_stats.
>
> no real help there. either it hits the group being read, and does a good
> plan, or it doesn't, and tries to seqscan (unless I disable it). even
> forcing stats to 1000 only bandaids the situation, given the number of
> groups will eventually exceed that..
Like I say, that's not the point of gathering the stats. If one group
represents 95% of your rows, then its group-id should be almost certain
to occur in the stats. Are you saying that's not happening with your data?
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-04-14 19:31:54 | Re: shared_buffers performance |
Previous Message | Tom Lane | 2008-04-14 17:46:06 | Re: varchar index joins not working? |