>Thank you. I am trying to also understand why the EXISTS needs the expression T1.PK_FLD = T2.PK_FLD in subquery and according to Naomi the WHERE IN does not need it. But your use of 1 should make the subquery run faster.
>
>PS. If this is a duplicate post, I apologize. UT just crashed on me.
>
It crashed for me too today a few times.
As I said in my other message, there is absolutely no difference in using EXISTS (select 1 ...)
or EXISTS (select * ...)
In WHERE IN we don't need an expression because IN actually selects all the values. The EXISTS subquery just tests and exits as soon as it finds a value satisfying the condition. So EXISTS may perform faster than IN in addition of possible problems associated with IN which you don't have when using EXISTS.
If it's not broken, fix it until it is.
My Blog