pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bricklen Anderson <BAnderson@PresiNET.com>
To: David Gagnon <dgagnon@siunik.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Please help with this explain analyse...
Date: Mon, 28 Nov 2005 15:46:14 -0800
Message-ID: <438B96C6.4090902@PresiNET.com> (raw)
In-Reply-To: <438B958B.3010602@siunik.com>
References: <438B958B.3010602@siunik.com>

David Gagnon wrote:

> "              ->  Index Scan using cr_pk on cr  (cost=0.00..6.02 rows=1
> width=828) (actual time=0.073..0.077 rows=1 loops=13587)"
> "                    Index Cond: (((cr.crypnum)::text = 'M'::text) AND
> (cr.crnum = "outer".cscrnum))"
> "                    Filter: ((crdate + '00:00:00'::interval) <=
> '2005-01-28 00:00:00'::timestamp without time zone)"
> "        ->  Index Scan using rr_pk on rr  (cost=0.00..5.99 rows=1
> width=5637) (actual time=0.062..0.069 rows=1 loops=8335)"
> "              Index Cond: (("outer".crrrnum)::text = (rr.rrnum)::text)"
> "  ->  Index Scan using yr_idx1 on yr  (cost=0.00..5.99 rows=1
> width=926) (actual time=0.127..17.379 rows=1154 loops=8335)"

Your loops are what is causing the time spent.
eg. "actual time=0.127..17.379 rows=1154 loops=8335)" ==
8335*(17.379-0.127)/1000=>143 secs (if my math is correct).



-- 
_______________________________

This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations. Any distribution, use or
copying of this e-mail or the information it contains by other than an
intended recipient is unauthorized. If you received this e-mail in
error, please advise me (by return e-mail or otherwise) immediately.
_______________________________



view thread (4+ messages)  latest in thread

Message-ID: <438B96C6.4090902@PresiNET.com>
Permalink:  ../438B96C6.4090902@PresiNET.com/
Also on:    postgresql.org/message-id/438B96C6.4090902@PresiNET.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: BAnderson@PresiNET.com, dgagnon@siunik.com
  Subject: Re: Please help with this explain analyse...
  In-Reply-To: <438B96C6.4090902@PresiNET.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox