Skip site navigation (1) Skip section navigation (2)

Re: Query performance issue

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "Jayadevan M" <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
Cc: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "PGSQL Performance" <pgsql-performance(at)postgresql(dot)org>, pgsql-performance-owner(at)postgresql(dot)org
Subject: Re: Query performance issue
Date: 2011-08-31 11:41:55
Message-ID: (view raw or whole thread)
Lists: pgsql-performance
On 31 Srpen 2011, 13:19, Jayadevan M wrote:
> Hello,
>> >
>> > Please run EXPLAIN ANALYZE on the query and post that, it's hard to
> say
>> > what's wrong from just the query plan, without knowing where the time
> is
>> > actually spent.
>> Here is the explain analyze
> Going through the url tells me that statistics may be off. I will try
> analyzing the tables. That should help?
> Regards,
> Jayadevan

That could help, but not necessarily.

A really interesting part is the sort near the bottom -

->  Sort  (cost=1895.95..1896.49 rows=215 width=61) (actual
time=25.926..711784.723 rows=2673340321 loops=1)
    Sort Key: memmst.memshpsta
    Sort Method:  quicksort  Memory: 206kB
    ->  Nested Loop  (cost=0.01..1887.62 rows=215 width=61) (actual
time=0.088..23.445 rows=1121 loops=1)

How can a sort ge 1121 rows at the input and return 2673340321 rows at the
output? Not sure where this comes from.

BTW what PostgreSQL version is this?


In response to


pgsql-performance by date

Next:From: Jayadevan MDate: 2011-08-31 11:57:21
Subject: Re: Query performance issue
Previous:From: Venkat BalajiDate: 2011-08-31 11:32:58
Subject: Re: Query performance issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group