From: | "Gregory Wood" <gregw(at)com-stock(dot)com> |
---|---|
To: | "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Yet another "Why won't PostgreSQL use my index?" |
Date: | 2002-06-20 17:19:19 |
Message-ID: | 004801c2187e$9da8b360$7889ffcc@comstock.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Nothing like replying to your own message...
I updated that file with the pg_stats information as well.
Don't know if that was included with my other message as I was editing it
when it got sent :/
Greg
----- Original Message -----
From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, June 20, 2002 1:13 PM
Subject: Re: [GENERAL] Yet another "Why won't PostgreSQL use my index?"
> I am assuming that this query is retrieving what you are looking for:
>
> SELECT pg_statistic.* FROM pg_statistic JOIN pg_attribute ON
> starelid=attrelid WHERE attname='idx_siteid';
>
> I've attached the results so they don't wrap quite as badly.
>
> Also included is a count for the individual idx_siteid values, if that
might
> be useful to see how they are distibuted.
>
> Greg
>
> ----- Original Message -----
> From: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
> To: "Gregory Wood" <gregw(at)com-stock(dot)com>
> Cc: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
> Sent: Thursday, June 20, 2002 12:19 PM
> Subject: Re: [GENERAL] Yet another "Why won't PostgreSQL use my index?"
>
>
> >
> > On Thu, 20 Jun 2002, Gregory Wood wrote:
> >
> > > Trying to use a single column index on a somewhat large table (1.9M
> rows),
> > > and PostgreSQL really doesn't want to. It estimates the number of rows
> at
> > > 12749 (actual 354), which is only .6% of the table... well within
> reasonable
> > > index range I would think. And yes, I've run an analyze on the table.
> >
> > It might be interesting to figure out why it's over estimating the rows
> > so badly. What do the statistics in pg_statistic for that
> > relation/attribute look like?
> >
>
Attachment | Content-Type | Size |
---|---|---|
pg_statistic_idx_siteid.txt | text/plain | 10.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Dimov | 2002-06-20 17:21:21 | URGENT: Performance tuning |
Previous Message | Gregory Wood | 2002-06-20 17:13:30 | Re: Yet another "Why won't PostgreSQL use my index?" |