Re: RestrictionClauseSelectivity error on select - Mailing list pgsql-novice

From Tom Lane
Subject Re: RestrictionClauseSelectivity error on select
Date
Msg-id 7236.966141491@sss.pgh.pa.us
Whole thread Raw
In response to RestrictionClauseSelectivity error on select  (danny@lennon.postino.com)
List pgsql-novice
danny@lennon.postino.com writes:
> I am trying to do a select * from table where column like '%pattern%' ;
> from a varchar field, and am getting the error:
> RestrictionClauseSelectivity : bad value - 1.98625  error .

Short term solution: VACUUM ANALYZE to fix bogus statistical data.

Long term solution: update to a newer pgsql release.  The bug that
causes creation of the bogus stats has been fixed since 6.5 or so,
IIRC.

            regards, tom lane

pgsql-novice by date:

Previous
From: danny@lennon.postino.com
Date:
Subject: RestrictionClauseSelectivity error on select
Next
From: "Paul Skinner"
Date:
Subject: pg_lo_write