Re: [PERFORM] help with understanding EXPLAIN

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Brandon Casci <brandon(at)loudcaster(dot)com>, "List, Postgres" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PERFORM] help with understanding EXPLAIN
Date: 2010-10-16 01:17:59
Message-ID: 4CB8FD47.7090101@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On 10/14/2010 05:18 AM, Brandon Casci wrote:
> Hello
>
> I have an application hosted on Heroku. They use postgres. It's more or
> less abstracted away, but I can get some performance data from New
> Relic. For the most part, performance is ok, but now and then some
> queries take a few seconds, and spike up to 15 or even 16 seconds! Ouch!
>
> This is the most detailed information I could get form New Relic. Do you
> have any suggestions how I could improve the performance?

That query plan is nearly illegible, and it contains no information
about how the query actually executed or how many rows were fetched from
various tables. I can't personally see any way to give you useful advice
based on that information.

I know you're going through a third party, but do think you could get
them to post the original form, unmangled by mail clients and whatever
else they've done to it, here? :

http://explain.depesz.com

Get them to use EXPLAIN ANALYZE rather than plain EXPLAIN, and to
provide the text of the query that generated the plan.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guy Rouillier 2010-10-16 04:10:38 Re: It it possible to get this result in one query?
Previous Message Craig Ringer 2010-10-16 01:13:10 Re: Strange phenomenon

Browse pgsql-performance by date

  From Date Subject
Next Message Tatsuo Ishii 2010-10-16 01:47:38 Re: Stored procedure declared as VOLATILE => no good optimization is done
Previous Message Merlin Moncure 2010-10-15 21:06:55 Re: Stored procedure declared as VOLATILE => no good optimization is done