How do you explain the cost is about ten times lower in the 2nd query than the first ?
Function call cost ? Can you EXPLAIN ANALYZE ? -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance