Yang Zhang <[email protected]> writes:
>> # select count(1) from (SELECT * from metarelcould_transactionlog
>> order by transactionid) as foo;
> Does it strike anyone else that the query optimizer/rewriter should be
> able to toss out the sort from such a query altogether?
It could, if it knew that the aggregate function didn't care about input
row order. We don't have that knowledge about aggregates ATM.
regards, tom lane
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general