Search Postgresql Archives

Re: Problem with planner

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

 



hubert depesz lubaczewski <depesz@xxxxxxxxxx> writes:
> and we have a query:
> select count(*) from objects where state='active'::text and ending_tsz <= ( select now() - '1 day'::interval );

Try getting rid of the sub-select.  There might have been a reason to do
it like that ten years ago, but these days it's a guaranteed
pessimization.

			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