On Sat, Jul 3, 2010 at 8:47 PM, Maksym Boguk <Maxim.Boguk@gmail.com> wrote:
> notable planner had correctly estimated amount of rows in one side of the
> join:
> (Append =A0(cost=3D0.00..0.98 rows=3D2 width=3D4))
> and planner hard correctly estimated amount of rows in the another side of
> the join:
> Index Scan using t3_value_key on t3 =A0(cost=3D0.00..0.49 rows=3D1 width=
=3D8)
>
> And instead of use 2(from append)*1(from scan on t3)=3D2 as final row
> estimation, planner chooses use heuristic value 1000.
2 isn't necessarily correct, because the two rows on the outer side
needn't match the 1 row on the inner side - it could be less.
But I agree with you that the estimate of 1000 doesn't seem to make
much sense. I'm not sure where that's coming from.
--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company