Help on analyzing performance problem. - Mailing list pgsql-general

From Travis Bauer
Subject Help on analyzing performance problem.
Date
Msg-id NEBBKFAPMLLNJENAEJNDAEBJCAAA.trbauer@cs.indiana.edu
Whole thread Raw
Responses Re: Help on analyzing performance problem.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I have a problem with a _very_ slow query.  I'm not sure how to understand
the explain output.  Can anyone tell from the following where I might look
for a bottleneck in the system?

Thank,
Travis

psql:test.sql:1: NOTICE:  QUERY PLAN:

Nested Loop  (cost=3.03..240.90 rows=4 width=124)
  ->  Nested Loop  (cost=3.03..150.16 rows=7 width=92)
        ->  Merge Join  (cost=3.03..3.63 rows=11 width=76)
              ->  Sort  (cost=1.52..1.52 rows=17 width=32)
                    ->  Seq Scan on oilday  (cost=0.00..1.17 rows=17
width=32)
              ->  Sort  (cost=1.52..1.52 rows=17 width=44)
                    ->  Seq Scan on oilday  (cost=0.00..1.17 rows=17
width=44)
        ->  Index Scan using well_pkey on well  (cost=0.00..13.45 rows=1
width=16)
              SubPlan
                ->  Materialize  (cost=11.44..11.44 rows=82 width=12)
                      ->  Nested Loop  (cost=0.00..11.44 rows=82 width=12)
                            ->  Seq Scan on usernames  (cost=0.00..1.03
rows=1 width=4)
                            ->  Index Scan using comp_index on well
(cost=0.00..10.21 rows=15 width=8)
  ->  Index Scan using well_pkey on well  (cost=0.00..13.45 rows=1 width=32)
        SubPlan
          ->  Materialize  (cost=11.44..11.44 rows=82 width=12)
                ->  Nested Loop  (cost=0.00..11.44 rows=82 width=12)
                      ->  Seq Scan on usernames  (cost=0.00..1.03 rows=1
width=4)
                      ->  Index Scan using comp_index on well
(cost=0.00..10.21 rows=15 width=8)


pgsql-general by date:

Previous
From: Jurgen Defurne
Date:
Subject: Re: table count limitation
Next
From: Bill Barnes
Date:
Subject: pgaccess not connecting