From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "pgsql-hackers" <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | What does explain show ? |
Date: | 1999-07-14 02:38:54 |
Message-ID: | 000501becda2$03e6b580$2801007e@cadzone.tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
I have a question about "explain" output.
Could someone teach me ?
Let a and b tables such that
create table a (
int4 pkey primary key,
....
);
create table b (
int4 key1,
int2 key2,
....,
primary key (key1,key2)
);
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" ?
Regards.
Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-07-14 02:56:42 | Re: [HACKERS] What does explain show ? |
Previous Message | Hiroshi Inoue | 1999-07-14 02:25:09 | 9-key index ? |