Re: [HACKERS] Random plan selection in DBT-3

2008-01-06 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > There might be regularity in the plan selection. When I connect to postgres > newly, I see plans { A, B, A, A ... }. Then disconnect, re-connect and send > the same EXPLAINs, the same pattern was reproduced. Hmph ... maybe some effect associated with

Re: [HACKERS] Random plan selection in DBT-3

2008-01-06 Thread ITAGAKI Takahiro
Tom Lane <[EMAIL PROTECTED]> wrote: > ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > > I tested 8.3beta4 with DBT-3 (TPC-H) and found unstable selection of plans. > > Planner randomly selected two types of plans (A, B) when I repeated EXPLAIN. > > Are you sure the statistics weren't changing und

Re: [HACKERS] Random plan selection in DBT-3

2008-01-06 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > I tested 8.3beta4 with DBT-3 (TPC-H) and found unstable selection of plans. > Planner randomly selected two types of plans (A, B) when I repeated EXPLAIN. Are you sure the statistics weren't changing underneath you (due to auto-vacuum or auto-analyze)

[HACKERS] Random plan selection in DBT-3

2008-01-06 Thread ITAGAKI Takahiro
I tested 8.3beta4 with DBT-3 (TPC-H) and found unstable selection of plans. Planner randomly selected two types of plans (A, B) when I repeated EXPLAIN. One of the conditions is used in Seq Scan Filter in Plan A. In contrast, the same condition is used in Hash Join filter in Plan B. Plan A is fast