Re: [PERFORM] Optimizer wrongly picks Nested Loop Left Join

2005-05-11 Thread Edin Kadribasic
From: "Tom Lane" <[EMAIL PROTECTED]> > "Edin Kadribasic" <[EMAIL PROTECTED]> writes: > > I have a query that is giving the optimizer (and me) great headache. > > The main problem seems to be that the rowcount estimates for > axp_temp_order_match and axp_dayschedule are way off: > > > -> I

Re: [PERFORM] Optimizer wrongly picks Nested Loop Left Join

2005-05-11 Thread Tom Lane
John A Meinel <[EMAIL PROTECTED]> writes: > Unfortunately, because Hash Join doesn't report the number of rows > (rows=0 always), it's hard to tell how good the estimator is. This is only a cosmetic problem because you can just look at the number of rows actually emitted by the Hash node's child;

Re: [PERFORM] Optimizer wrongly picks Nested Loop Left Join

2005-05-11 Thread Tom Lane
"Edin Kadribasic" <[EMAIL PROTECTED]> writes: > I have a query that is giving the optimizer (and me) great headache. The main problem seems to be that the rowcount estimates for axp_temp_order_match and axp_dayschedule are way off: > -> Index Scan using axp_temp_order_match_idx1 on > ax

Re: [PERFORM] Optimizer wrongly picks Nested Loop Left Join

2005-05-11 Thread John A Meinel
Edin Kadribasic wrote: Hi, I have a query that is giving the optimizer (and me) great headache. When its in the good mood the optimizer chooses Hash Left Join and the query executes in 13ms or so, but sometimes (more and more often) it chooses Nested Loop Left Join and the execution time goes up to

[PERFORM] Optimizer wrongly picks Nested Loop Left Join

2005-05-11 Thread Edin Kadribasic
Hi, I have a query that is giving the optimizer (and me) great headache. When its in the good mood the optimizer chooses Hash Left Join and the query executes in 13ms or so, but sometimes (more and more often) it chooses Nested Loop Left Join and the execution time goes up to 2-30sec. The query: