RE: [HACKERS] What does explain show ?
От | Hiroshi Inoue |
---|---|
Тема | RE: [HACKERS] What does explain show ? |
Дата | |
Msg-id | 000b01becda8$7a66a660$2801007e@cadzone.tpf.co.jp обсуждение исходный текст |
Ответ на | Re: [HACKERS] What does explain show ? (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] What does explain show ?
|
Список | pgsql-hackers |
> -----Original Message----- > From: Bruce Momjian [mailto:maillist@candle.pha.pa.us] > Sent: Wednesday, July 14, 1999 11:57 AM > To: Hiroshi Inoue > Cc: pgsql-hackers > Subject: Re: [HACKERS] What does explain show ? > > > > Table a has 15905 rows and table b has 25905 rows. > > > > > > For the following query > > > > select a.pkey, b.key2 from a, b > > where b.key1 = 1369 > > and a.pkey = b.key1; > > > > "explain" shows > > > > NOTICE: QUERY PLAN: > > > > Nested Loop (cost=6.19 rows=3 width=10) > > -> Index Scan using b_pkey on b on b (cost=2.09 rows=2 width=6) > > -> Index Scan using a_pkey on a on a (cost=2.05 rows=15905 width=4) > > > > What does "rows=15905" of InnerPlan mean ? > > Is "rows=3" of Nested Loop irrelevant to "rows=15905" ? > > It means it thinks it is going to access X rows in that pass, but end > up with 3 joined rows as a result of the nested loop. It is only an > estimate, based on table size and column uniqueness from vacuum analyze. > Hmmm,I couldn't understand where does "rows=15905" come from. Shouldn't "rows" of InnerPlan be 1 ? Is the caluculation "rows of Nested loop = rows of OuterPlan * rows of InnerPlan" wrong ? Regards. Hiroshi Inoue Inoue@tpf.co.jp
В списке pgsql-hackers по дате отправления: