From: Tom Lane <tgl@sss.pgh.pa.us>
To: jdunn@autorevenue.com
Cc: 'Postgresql Performance' <pgsql-performance@postgresql.org>
Subject: Re: index v. seqscan for certain values
Date: Tue, 13 Apr 2004 13:55:49 -0400
Message-ID: <24670.1081878949@sss.pgh.pa.us> (raw)
In-Reply-To: <000801c42165$68a67750$4f01a8c0@jeremydunn>
References: <000801c42165$68a67750$4f01a8c0@jeremydunn>
"Jeremy Dunn" <jdunn@autorevenue.com> writes:
> Interestingly, I tried increasing the stat size for the CID column to
> 2000, analyzing, and checking the accuracy of the stats again.
There's a hard limit of 1000, I believe. Didn't it give you a warning
saying so?
At 1000 the ANALYZE sample size would be 300000 rows, or about a quarter
of your table. I would have thought this would give frequency estimates
with much better precision than you seem to be seeing --- but my
statistics are rusty enough that I'm not sure about it. Possibly the
nonuniform clumping of CID has something to do with the poor results.
Any stats majors on the list?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, jdunn@autorevenue.com
Subject: Re: index v. seqscan for certain values
In-Reply-To: <24670.1081878949@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox