| From: | Björn Lindqvist <bjourne(at)gmail(dot)com> |
|---|---|
| To: | Scott Mead <scott(dot)lists(at)enterprisedb(dot)com> |
| Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Completely wrong row estimates |
| Date: | 2010-04-06 13:21:24 |
| Message-ID: | k2g740c3aec1004060621u6b217eefi916610ac253bec8d@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Den 6 april 2010 14.22 skrev Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>:
>
> 2010/4/6 Björn Lindqvist <bjourne(at)gmail(dot)com>
>>
>> Den 5 april 2010 11.57 skrev Magnus Hagander <magnus(at)hagander(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andy Colson | 2010-04-06 14:57:09 | Re: Fuzzy string matching of product names |
| Previous Message | Scott Mead | 2010-04-06 12:22:00 | Re: Completely wrong row estimates |