Thread: RestrictionClauseSelectivity error on select
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 . I am at a loss to figure out why the select is failing. Any help appreciated. -- Danny Aldham Providing Certified Internetworking Solutions to Business www.postino.com E-Mail, Web Servers, Web Databases, SQL PHP & Perl
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