Hi, experts -
For performance, I want to find if any row exists (do not need to count all rows) then I go to another routine else I exit.
Is below select query still reading big table after finding 1st row ?
if exists (select 1 from bigTable with (nolock)
where aDate = @aDate and type = @type)
-- another routine
I think query stops after finding 1st row having if exists clause, but wanted to confirm.
If anyone thinks select is counting all rows - can you explain how and give me a tip, thanks