Thanks for all the advice here. I'll look at setting up something in a test environment and play with the clustering. Testing how other queries perform against the clustering, also. Thank you! Sam -----Original Message----- From: David Kerr [mailto:dmk@xxxxxxxxxxxxxx] Sent: Friday, 4 October 2013 1:55 AM To: Samuel Stearns Cc: Claudio Freire; David Johnston; pgsql-performance@xxxxxxxxxxxxxx Subject: Re: 57 minute SELECT On Thu, Oct 03, 2013 at 09:20:52AM -0700, David Kerr wrote: - On Thu, Oct 03, 2013 at 01:47:29AM +0000, Samuel Stearns wrote: - - Thanks, Claudio: - - - - http://explain.depesz.com/s/WJQx - - You're spending a lot of time in the hash join which can kill a system with - low ram. - - You may, just for fun, want to try the query with enable_hashjoin=false. Sorry, ignore that, more coffe before mailing lists for me. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance