Best way to get record count if count greater than int

  • I am trying to get a record count of a very large table, sp_spaceused reports the maximum value of an int (2147483647). Is there any other way to get a more accurate count without it taking days?

  • could use COUNT_BIG()

    SELECT COUNT_BIG(*) FROM table

  • Right click of the table and check property. I will show the count or you can query sysindexes table for Indid=0 or 1 (depends if you have Clustered Index or not)

     

     


    Kindest Regards,

    Amit Lohia

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply