The fastest way to get a table row count in SQL Server

While variations on select (xyz) from table all work, they all suffer from searching/scanning data and the overheads that incurs. The best mechanism I have found is;

EXEC sp_spaceused N'<schema>.<table name>’;

 

Leave a comment