| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | 陈雁飞 <postgresql_2016(at)163(dot)com> |
| Cc: | pgsql-performance(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Estimate of the inner_rows |
| Date: | 2024-09-08 16:50:34 |
| Message-ID: | 2688169.1725814234@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
=?GBK?B?s8LR47fJ?= <postgresql_2016(at)163(dot)com> writes:
> postgres=# explain select * from test t1 left join test t2 on t1.b = t2.b and t2.c = 10 where t1.a = 1;
> QUERY PLAN
> -----------------------------------------------------------------------------
> Nested Loop Left Join (cost=0.85..48.16 rows=7418 width=24)
> -> Index Scan using a_idx on test t1 (cost=0.43..8.45 rows=1 width=12)
> Index Cond: (a = 1)
> -> Index Scan using b_idx on test t2 (cost=0.43..39.64 rows=7 width=12)
> Index Cond: (b = t1.b)
> Filter: (c = 10)
> (6 rows)
I tried to reproduce this and could not. What PG version are you
running exactly? Can you provide a self-contained example?
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-09-09 03:30:42 | Re: Estimate of the inner_rows |
| Previous Message | 陈雁飞 | 2024-09-08 08:21:12 | Estimate of the inner_rows |