Estimate of the inner_rows

2024-09-08 Thread 陈雁飞
Hi I encounter an query plan problem like as the following. It's contain two nodes which assume the result is 1 and 7, but however, the last result is 7418. And the actual result is just 1, but because of the result is too big, which will affect the following join methods. And I've analyze the r

Re: Estimate of the inner_rows

2024-09-08 Thread Tom Lane
=?GBK?B?s8LR47fJ?= 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

Re: Estimate of the inner_rows

2024-09-08 Thread Tom Lane
=?GBK?B?s8LR47fJ?= writes: > 1¡¢The first problem is found in PG9.2 for our profuction version. But I test > in the latest version. You're still running 9.2 in production? That's ... inadvisable. > 2¡¢The data is simply. The data in b has many distinct number, and the data > in C=10 has too m