Home Forums Article Discussions Article Discussions by Author Discuss content posted by mperdeck Speeding up database access - part 4 Fixing expensive queries RE: Speeding up database access - part 4 Fixing expensive queries
christian.stahl
SSC Enthusiast
Points: 103
More actions
August 30, 2011 at 6:33 am
#1374927
I agree with what you wrote regarding the use of EXISTS being more efficient than using COUNT.
To take it one notch higher, I always use
EXISTS (select TOP 1 PrimaryKeyField FROM myTable )
to use as little data as necessary for the test.