I'm sure someone can quickly solve this for me. I'm sure I'm not the first to ask this question, but i didn't find anything similar yet.
Having the following WHERE statement:
WHERE boolean_expression1 OR boolean_expression2 OR subquery_count > 0
Is this executed this way?:
- if (boolean_expression1 = true) -> exit with true
- else if (boolean_expression2 = true) -> exit with true
- else -> execute subquery?
I mean: Is the subquery only executed if the preceeding expressions both are false? And if not, is there any way I can ensure this?
Because the subquery could be quite expensive in my case.
Thx in advance, Chris