January 13, 2006 at 2:45 pm
Hi,
If we use to much parenthesis in our query (see beleow), does the optimiser are going to ignore thoses parenthesis and generate a good plan ? Or does the performance of the query are going to be affected ?
FROM ((((…………..
LEFT OUTER JOIN…… ON
(………….. = ……………))
LEFT OUTER JOIN ……. ON
(…………… = …………….) AND
(……………. = …………….))
LEFT OUTER JOIN ……… ON
(……………. = ……………))
LEFT OUTER JOIN ………. ON
(………….. = ……………..) AND
(…………… = …………….) AND
(…………… = …………….) AND
(……………..= …………….'))
thank you
Danny (calico)
January 13, 2006 at 3:19 pm
Why are there parenthesis around the join columns? I shouldn't make a difference in the execution plan. Try stripping out the unneeded parenthesis and comparing the exectution plans and runtime statistics.
January 14, 2006 at 6:55 am
i've seen programs which generate code based on user selections build queries like this....i would guess just running it thru query analyzer and having the show plan on would let youy see whether it affects the query:
paste the query into a query window, do CONTROL+K to turn on show executtion plan and run it;
compare it to the way you would write it normally and do the same thing...look for differences betweent eh two plans.
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply