Re: 57 minute SELECT

From: Samuel Stearns <sstearns(at)staff(dot)iinet(dot)net(dot)au>
To: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: 57 minute SELECT
Date: 2013-10-03 02:04:33
Message-ID: CB03CD8D2C3F9347BAFEC8EA9DD89C9318D37ACA@ISP-OSB-DAG2.win2k.iinet.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Thanks, David.

Can't run EXPLAIN (ANALYZE, BUFFERS) as I'm on 8.4.

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org [mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of David Johnston
Sent: Thursday, 3 October 2013 11:19 AM
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] 57 minute SELECT

Samuel Stearns-2 wrote
> EXPLAIN:
>
> QUERY PLAN
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> - Hash Join (cost=408.53..1962721.39 rows=98068 width=126) (actual
> time=30121.265..3419306.752 rows=1929714 loops=1)

You are selecting and returning 2 million records...how fast do you want this to run? For some reason I read 57 seconds initially - I guess 57 minutes is a bit much...but the most obvious solution is RAM.

Might want to include buffers output in the explain as well but:

I'm doubting the contents of your result fit into the server memory so your disk is involved which will severely slow down processing.

Hopefully someone more knowledgeable and experience will chime in to help you.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/57-minute-SELECT-tp5773169p5773187.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2013-10-03 04:13:58 Re: 57 minute SELECT
Previous Message David Johnston 2013-10-03 01:48:41 Re: 57 minute SELECT