Re: 7.3.2 vs 7.1.2

Поиск
Список
Период
Сортировка
От Victor Yegorov
Тема Re: 7.3.2 vs 7.1.2
Дата
Msg-id 20030520140713.GN1976@nordlb.lv
обсуждение исходный текст
Ответ на Re: 7.3.2 vs 7.1.2  (Eugene Fokin <elf@solvo.ru>)
Ответы Re: 7.3.2 vs 7.1.2  (Eugene Fokin <elf@solvo.ru>)
Re: 7.3.2 vs 7.1.2  (Josh Berkus <josh@agliodbs.com>)
Re: 7.3.2 vs 7.1.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
* 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.13rows=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.13rows=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.76rows=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.84rows=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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Eugene Fokin
Дата:
Сообщение: Re: 7.3.2 vs 7.1.2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: nested select query failing