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

Re: Please help with this explain analyse...

From: Bricklen Anderson <BAnderson(at)PresiNET(dot)com>
To: David Gagnon <dgagnon(at)siunik(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Please help with this explain analyse...
Date: 2005-11-28 23:46:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
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.

In response to


pgsql-performance by date

Next:From: Tom LaneDate: 2005-11-29 00:00:30
Subject: Re: Please help with this explain analyse...
Previous:From: David GagnonDate: 2005-11-28 23:40:59
Subject: Please help with this explain analyse...

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