Re: 7.0.x not using indices - Mailing list pgsql-bugs

From Tom Lane
Subject Re: 7.0.x not using indices
Date
Msg-id 6091.983897052@sss.pgh.pa.us
Whole thread Raw
In response to 7.0.x not using indices  (Marcin Wolinski <wolinski@mimuw.edu.pl>)
List pgsql-bugs
Marcin Wolinski <wolinski@mimuw.edu.pl> writes:
> After this the 'w' class contains 116170 rows.  For each value of wfid
> there are no more than 7584 different values of wnr (with median of 1
> value per wfid and only in about 1000 cases 10 values or more).

The problem here is the huge differential between the typical and
maximum frequency of wfid values.  Can you do something to get rid of
the outlier with 7584 values?

See past pghackers discussions about the need for more extensive
statistics to allow improvements in row-count estimation.  As long as
the only stat we have is the frequency of the most common value,
there's no way not to get fooled by this sort of data distribution :-(

> BTW. How can I learn to read these query plans?

See
http://www.postgresql.org/devel-corner/docs/postgres/performance-tips.html#USING-EXPLAIN

            regards, tom lane

pgsql-bugs by date:

Previous
From: Neil Prockter
Date:
Subject: Slight help bug with su'ing
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Mis-firing of rules with a WHERE condition