Re: [HACKERS] subselect and optimizer
От
t-ishii@sra.co.jp
Тема
Re: [HACKERS] subselect and optimizer
Дата
Msg-id
199804101045.TAA00249@srapc451.sra.co.jp
Ответ на
Re: [HACKERS] subselect and optimizer (Bruce Momjian)
Список
Дерево обсуждения
Re: [HACKERS] subselect and optimizer "Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
Re: [HACKERS] subselect and optimizer "Boersenspielteam" <boersenspiel@vocalweb.de>
Re: [HACKERS] subselect and optimizer t-ishii@sra.co.jp
Re: [HACKERS] subselect and optimizer Bruce Momjian <maillist@candle.pha.pa.us>
>I will say we have an optimization problem with tables being referenced
>multiple times in a query, but I don't know if this is the cause, though
>you could test it by making a copy of order_tbl with another name, and
>testing the speed.
Thank you for your suggestion. I made a copy of order_tbl (named
order_tbl1) and did a query:
explain select * from product,order_tbl where \
product.serial=order_tbl.serial and product.serial in \
(select serial from order_tbl1 where cust_id='H3550');
NOTICE: QUERY PLAN:
Hash Join (cost=934.65 size=798 width=112)
-> Seq Scan on order_tbl (cost=296.82 size=6843 width=36)
-> Hash (cost=0.00 size=0 width=0)
-> Seq Scan on product (cost=383.71 size=797 width=76)
SubPlan
-> Index Scan on order_tbl1 (cost=2.05 size=1 width=12)
Seems like no change here?
--
Tatsuo Ishii
t-ishii@sra.co.jp
В списке pgsql-hackers по дате отправления