Re: question about seq scan and index scan - Mailing list pgsql-general

From Tom Lane
Subject Re: question about seq scan and index scan
Date
Msg-id 27356.1035642704@sss.pgh.pa.us
Whole thread Raw
In response to Re: question about seq scan and index scan  (Hervé Piedvache <herve@elma.fr>)
Responses Re: question about seq scan and index scan  (Hervé Piedvache <herve@elma.fr>)
List pgsql-general
=?iso-8859-15?q?Herv=E9=20Piedvache?= <herve@elma.fr> writes:
> Le Vendredi 25 Octobre 2002 20:17, Stephan Szabo a �crit :
>> Are the estimated number of rows for the scan of a (4379, 3987, and 29)
>> realistic for mynumber>(23000, 23500, 24000)

> I'm surpise about this answer for

>> 23000
> result is 98

>> 23350
> result is 96

>> 24000
> result is  93

Hmm, have you "ANALYZE"d this table recently?  If so it would be
interesting to see the pg_stats row for tablea.mynumber.

If the distribution of mynumber is very uneven, it might be worth
your while to increase the statistics target for the column, so that
the planner has more data points with which to make a better estimate.
See ALTER TABLE SET STATISTICS.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: GROUP BY array
Next
From: Hervé Piedvache
Date:
Subject: Re: question about seq scan and index scan