title: COUNT(1) Over() is taking time to get the total records count in sql server
body: <p>I have table with 250,000 records. There is one SP where I am getting those records as per paging. Along with paging I need to get the total record count as well. But when I add <code>COUNT(1) Over()</code> in SP it is taking time. And when I remove it with hardcoded value as 100 then SP results are coming in 1 sec. Is there any other way to get total records count?</p>