I need to quickly determine if records exist given a specific field value.
Record counts can be as high 500,000 rows or more.
I only need to see if at least one record exists.
Which is faster:
OR
OR
Testing each of the versions has been unrealiable due to the amount of records fluctuating. I really need an idea of which is more performance friendly.
Thats all.
Thanks in advance
Record counts can be as high 500,000 rows or more.
I only need to see if at least one record exists.
Which is faster:
Code:
SELECT * FROM TABLE WHERE CONDITION
Code:
SELECT TOP 1 * FROM TABLE WHERE CONDITION
Code:
IF EXISTS(SELECT * FROM TABLE WHERE CONDITION)
Thats all.
Thanks in advance
Comment