Re: Query performance issue - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Query performance issue
Date
Msg-id 4E6345520200002500040BD6@gw.wicourts.gov
Whole thread Raw
In response to Query performance issue  (Jayadevan M <Jayadevan.Maymala@ibsplc.com>)
Responses Re: Query performance issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-performance by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Query performance issue
Next
From: Tom Lane
Date:
Subject: Re: Query performance issue