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

Re: 7.3.2 vs 7.1.2

From: Victor Yegorov <viktors(dot)jegorovs(at)nordlb(dot)lv>
To: Eugene Fokin <elf(at)solvo(dot)ru>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: 7.3.2 vs 7.1.2
Date: 2003-05-20 14:07:13
Message-ID: 20030520140713.GN1976@nordlb.lv (view raw or flat)
Thread:
Lists: pgsql-performance
* Eugene Fokin <elf(at)solvo(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2003-05-20 15:18:26
Subject: Re: nested select query failing
Previous:From: Eugene FokinDate: 2003-05-20 13:28:42
Subject: Re: 7.3.2 vs 7.1.2

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