Re: Strange (?) Index behavior? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Strange (?) Index behavior?
Date
Msg-id 25492.1099713863@sss.pgh.pa.us
Whole thread Raw
In response to Re: Strange (?) Index behavior?  (Matt Clark <matt@ymogen.net>)
Responses Re: Strange (?) Index behavior?
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Vishal Kashyap @ [Sai Hertz And Control Systems]"
Date:
Subject: Re: postgresql amd-64
Next
From: Tom Lane
Date:
Subject: Re: vacuum analyze slows sql query