Search Postgresql Archives

Re: Forcing the right queryplan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Henk van Lingen <H.G.K.vanLingen@xxxxx> writes:
>          ->  Bitmap Heap Scan on systemevents  (cost=61221.23..668806.93 rows=239805 width=158) (actual time=9.131..1786.406 rows=464 loops=1)
>                Recheck Cond: (to_tsvector('english'::regconfig, message) @@ to_tsquery('131.211.112.9'::text))

Well, there's your problem: the planner is off by a factor of about 500
on its estimate of the number of rows matching this query, and that's
what's causing it to pick the wrong plan.  What you need to look into
is getting that estimate to be more in sync with reality.  Probably
increasing the stats target for the message column would help.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux