Thursday, June 10, 2010, 9:34:07 PM you wrote: > Time: 1.516 ms > Time: 13.177 ms I'd suppose the first query to scan a lot less rows than the second one. Could you supply an explained plan for the fast query? -- Jochen Erwied | home: jochen@xxxxxxxxx +49-208-38800-18, FAX: -19 Sauerbruchstr. 17 | work: joe@xxxxxxxxxxxxxxx +49-2151-7294-24, FAX: -50 D-45470 Muelheim | mobile: jochen.erwied@xxxxxxxxxxx +49-173-5404164 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance