From: Victor Yegorov <viktors.jegorovs@nordlb.lv>
To: Eugene Fokin <elf@solvo.ru>
Cc: pgsql-performance@postgresql.org
Subject: Re: 7.3.2 vs 7.1.2
Date: Tue, 20 May 2003 17:07:13 +0300
Message-ID: <20030520140713.GN1976@nordlb.lv> (raw)
In-Reply-To: <20030520132842.GA29262@solvo.ru>
References: <20030520122838.GA28654@solvo.ru>
<20030520130913.GM1976@nordlb.lv>
<20030520132842.GA29262@solvo.ru>
* Eugene Fokin <elf@solvo.ru> [20.05.2003 16:33]:
> 7.2.1:
> -> Merge Join (cost=0.00..19885.60 rows=147281 width=8) (actual time=0.08..2059.89 rows=147281 loops=1)
> -> Index Scan using load_rcn_id_idx on loads l (cost=0.00..17026.36 rows=147281 width=4) (actual time=0.04..786.13 rows=147281 loops=1)
> -> Index Scan using rcn_detail_idx on rcn_details (cost=0.00..618.30 rows=12692 width=4) (actual time=0.03..510.13 rows=151332 loops=1)
snip
> 7.3.2:
> -> Merge Join (cost=0.00..19524.78 rows=147281 width=189) (actual time=0.14..9419.68 rows=147281 loops=1)
> Merge Cond: ("outer".rcn_id = "inner".id)
> -> Index Scan using load_rcn_id_idx on loads l (cost=0.00..16659.18 rows=147281 width=181) (actual time=0.07..4486.76 rows=147281 loops=1)
> -> Index Scan using rcn_detail_idx on rcn_details (cost=0.00..624.96 rows=12692 width=8) (actual time=0.02..587.84 rows=151332 loops=1)
As you can see, in 7.2.1 index scan on loads (load_rcn_id_idx) takes 0.04..786.13,
but in 7.3.2 - 0.07..4486.76.
Also, note the difference in the:
7.2.1 "... rows=147281 width=4) ..."
7.3.2 "... rows=147281 width=181) ..."
My guesses:
1. Check your index.
2. Do vacuum analyze again.
3. This part:
(loads l JOIN (SELECT rcn_details.id, rcn_details.date_pour FROM rcn_details) r ON ((r.id = l.rcn_id)))
Why do you use subselect here? It seems to me, that you can simply join
whole table, can't you?
May be somebody else will point to some other details.
Good luck!
--
Victor Yegorov
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: viktors.jegorovs@nordlb.lv, elf@solvo.ru
Subject: Re: 7.3.2 vs 7.1.2
In-Reply-To: <20030520140713.GN1976@nordlb.lv>
References: <20030520122838.GA28654@solvo.ru> <20030520130913.GM1976@nordlb.lv> <20030520132842.GA29262@solvo.ru> <20030520140713.GN1976@nordlb.lv>
* 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