Re: Completely wrong row estimates - Mailing list pgsql-general

From Björn Lindqvist
Subject Re: Completely wrong row estimates
Date
Msg-id k2g740c3aec1004060621u6b217eefi916610ac253bec8d@mail.gmail.com
Whole thread Raw
In response to Re: Completely wrong row estimates  (Scott Mead <scott.lists@enterprisedb.com>)
List pgsql-general
Den 6 april 2010 14.22 skrev Scott Mead <scott.lists@enterprisedb.com>:
>
> 2010/4/6 Björn Lindqvist <bjourne@gmail.com>
>>
>> Den 5 april 2010 11.57 skrev Magnus Hagander <magnus@hagander.net>:
>> >> Note how the planner estimates that there are 766 rows in the table
>> >> that matches the word 'tagtext'. In reality 43374 does. I've tried to
>> >> get postgres to refresh the statistics by running with
>> >> enable_statistics_target=100, running VACUUM, VACUUM FULL, VACUUM FULL
>> >> ANALYZE etc but nothing works. Postgres seem stuck with its bad
>> >> statistics and unwilling to change them. There are many other strings
>> >> that also matches tens of thousands of rows in the table which
>> >> postgres only thinks matches 766.
>
> Have you tried running :
>  'EXPLAIN ANALYZE <your query>'
> ?
>   This will show you the estimates and the actuals (for each operation) side
> by side.

Yes, see my first message where I post the EXPLAIN ANALYZE output for the query.


--
mvh Björn

pgsql-general by date:

Previous
From: Scott Mead
Date:
Subject: Re: Completely wrong row estimates
Next
From: Andy Colson
Date:
Subject: Re: Fuzzy string matching of product names