On Sun, May 1, 2011 at 12:23 PM, Mark <Marek.Balgar@xxxxxxxxx> wrote: > Now the problem. > When I try ANALYZE it shows: That's a regular explain... can you post an EXPLAIN ANALYZE? Hash joins are very inefficient if they require big temporary files. I usually work around that by disabling hash joins for the problematic queries: set enable_hashjoin = false; <query> set enable_hashjoin = true; But an explain analyze would confirm or deny that theory. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance