Re: Re: Query not using index - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: Query not using index
Date
Msg-id 25024.989529727@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query not using index  (ryan@paymentalliance.net)
Responses Re: Re: Query not using index  (Chris Jones <chris@mt.sri.com>)
List pgsql-general
ryan@paymentalliance.net writes:
> No the query usually returns between 0 and 5 rows.  Usually not zero -
> most often 1.

Ah.  You must have a few values that are far more frequent (like tens of
thousands of occurrences?) and these are throwing off the planner's
statistics.

7.2 will probably do better with this sort of data distribution, but for
now it's a difficult problem.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: NAMEDATALEN
Next
From: John Coers
Date:
Subject: Re: COPY locking