On 20/06/2011 07:35, Vladimir Kulev wrote:

But this does not work:
# explain analyze select max(timestamp) from sms where number in
('5502712','5802693','5801981');

Try to rewrite that query this way:

explain analyze select timestamp from sms where number in ('5502712','5802693','5801981') order by timestamp desc limit 1;


Regards
Gaetano Mendola



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

Reply via email to