Is there a fast way to get total record size from a Table?
I know the query:
"select count(*) from MyTable"
totalRecords = cmd.ExecuteScalar();
would get the total record size, is there a faster way. Because the above code would look the whole table to calculate the total, am I correct.
I'm trying to do paging, need the total record size. Is it possible to get the toal record and using LIMIT @offset, @pagesize at the same time, so I don't have to excute the cmd two times?
Thanks
John