hubert depesz lubaczewski <[email protected]> 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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general