Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 "NOT EXISTS" must use "Left Anti Semi Join"?

Author  Topic 

Daniel_Buchholz
Starting Member

28 Posts

Posted - 2002-12-03 : 07:47:23
True or false?

The reason why i´m asking is: We have just applied a security hotfix (KB: 316333) to a server and after that some procedures using the "NOT EXISTS" sub-select statement are failing. The resultset now contains records that should have been excluded by the sub-select.

Without the fix the execution plan showed a left anti semi join operator which was just what I expected. With the fix the left anti semi join is not used and consequently the statement gives wrong data.

The failing procedure is a standard procedure so we don´t want to change anything of that (Commerce One). We are just trying to track down the problem.

I will try to put some sample code together so that everyone could try to reproduce the problem. In the meantime perhaps someone could answer the question: Does "NOT EXISTS" always require a "left anti semi join" operator?
Thanks!

Regards

Daniel

Sitka
Aged Yak Warrior

571 Posts

Posted - 2002-12-03 : 09:31:53
I don't know directly but in this situation if all that changed was a patch. First I'd be looking at the state of ANSI NULLS on the server.
Reason, Exists predicate can handle NULLS differently depending on ANSI null compliance setting. A patch may just have to change this setting and not put it back.

Voted best SQL forum nickname...."Tutorial-D"
Go to Top of Page
   

- Advertisement -