Thursday, April 2, 2015

Most efficient way to get row count with a where clause


SELECT COUNT(typeName)
FROM bigTable
WHERE typeName = 'ABC'

Do you have an index on typeName? That'll make a difference.




Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.


No comments:

Post a Comment