Re: Query performance issue

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <heikki(dot)linnakangas(at)enterprisedb(dot)com>, <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>, <pgsql-performance-owner(at)postgresql(dot)org>
Subject: Re: Query performance issue
Date: 2011-09-04 14:30:58
Message-ID: 4E6345520200002500040BD6@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jayadevan M wrote:

> Here is the explain analyze
> http://explain.depesz.com/s/MY1

> PostgreSQL 9.0.4 on x86_64-pc-solaris2.10

> work_mem = 96MB

Thanks for posting the query and related schema. I tried working
through it, but I keep coming back to this sort, and wondering how a
sort can have 1121 rows as input and 2673340321 rows as output. Does
anyone have any ideas on what could cause that?

-> 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)

-Kevin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2011-09-04 15:18:19 Re: Query performance issue
Previous Message Grzegorz Jaśkiewicz 2011-09-04 10:38:02 Re: Query performance issue