Usually we write "SELECT COUNT(*) FROM TABLE_NAME" to count the number of rows. However whenever the data is very large say some 10,00,00,00,000....,in these cases if we write the same query the response will be very slow. So to avoid it, We write following query,which gives you count in sort span of time:
SELECT ROWS FROM SYSINDEXES WHERE ID LIKE OBJECT_ID('AssociateDetails')
AND indid<2
In place of AssociateDetails write your own tablename and run the query to get the result.
SELECT ROWS FROM SYSINDEXES WHERE ID LIKE OBJECT_ID('AssociateDetails')
AND indid<2
In place of AssociateDetails write your own tablename and run the query to get the result.
No comments:
Post a Comment