From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matt Clark <matt@ymogen.net>
Cc: Allen Landsidel <alandsidel@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Strange (?) Index behavior?
Date: Fri, 05 Nov 2004 23:04:23 -0500
Message-ID: <25492.1099713863@sss.pgh.pa.us> (raw)
In-Reply-To: <418C1757.70909@ymogen.net>
References: <88f1825a041105095631064cb0@mail.gmail.com>
<008401c4c366$127d5260$8300a8c0@solent>
<88f1825a04110513028759dd3@mail.gmail.com>
<418C1757.70909@ymogen.net>
Matt Clark <matt@ymogen.net> writes:
> Well, 74000/76000000 ~= 0.1%, way less than 1/26, so no surprise that an
> indexscan is better, and also no surprise that the planner can't know
> that I is such an uncommon initial char.
But it *can* know that, at least given adequate ANALYZE statistics.
I'm pretty convinced that the basic answer to Allen's problem is to
increase the histogram size. How large he needs to make it is not
clear --- obviously his data distribution is not uniform, but I don't
have a fix on how badly non-uniform.
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, matt@ymogen.net, alandsidel@gmail.com
Subject: Re: Strange (?) Index behavior?
In-Reply-To: <25492.1099713863@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