Subject | Re: Problem with PLAN in query with left join |
---|---|
Author | Christian Kaufmann |
Post date | 2006-09-27T20:54:40Z |
> The problem isn't in your ATHLETE table, I would expectno. I did:
> join CLUB CA on CA.CLUBID = SR.CLUBID_ALT
> left join ATHLETE A on SR.ATHLETEID = A.ATHLETEID
> WHERE ...
left join ATHLETE A on SR.ATHLETEID = A.ATHLETEID
left join CLUB CA on CA.CLUBID = SR.CLUBID_ALT
CLUB is joined several times for different purposes.
The first plan is more or less perfect. And for my understanding it
could be used with the left join's too.
> attempt. Report back to the list what the plan is with thisI never used such +0. So I played arround and like this it works with
> additional +0, and if it still causes problems for you.
left join:
join RANKINGCLUB RC on RC.RANKINGCLUBID+0 = RI.RANKINGCLUBID
join RANKING2 R on R.RANKINGID+0 = RC.RANKINGID
So it works fine now, but what exactly is the influence of +0 ?
The plan now is:
PLAN SORT (JOIN (JOIN (JOIN (R INDEX (IX_RANKING_SEASON),ST INDEX
(PK_STYLE),RC INDEX (IX_RANKINGCLUB_RANKING),RI INDEX
(PK_RANKINGITEM2),SR INDEX (PK_SWIMRESULT),SE INDEX (PK_SWIMEVENT),C
INDEX (PK_CLUB),N INDEX (PK_CLUB),M INDEX (PK_MEET),MN INDEX
(PK_CLUB)),A INDEX (PK_ATHLETE)),CA INDEX (PK_CLUB)))
Is there a way I could force this plan or is adding these +0 an
offical way to force certain plans?
cu Christian