I ran a query through the SQL Optimizer and the best alternative query that it found does have drastically improved performance.
The issue is that I have never before seen the syntax used in the alternative query. I’ve asked some DBA’s and searched the web, but I still don’t have an explanation of what it means. I’m reluctant to use the alternative query if I don’t understand how it works.
Here’s a simple example:
WHERE A.col1 = B. col1
AND A.col2 = 1
WHERE A.col1 = B.col1 + 0
AND A.col2 + 0 = 1
Can anyone tell me what the “+ 0” is doing or point out a resource on the web that explains this?