• David Bird (12/8/2010)


    SanDroid my visual tests show the results are the same for both scripts except that TravisDBA script does not handle tables with a dbo schema. I do not know why.

    Neither do I since all the tables I tested it against have only a DBO schema and the ROW count was off by 12 million rows on the first table.

    Could it be that his script was counting table rows and table index rows?

    BTW: I tested your script and it is scary. It took forever to complete, and does not sort correctly on the Rows_cnt or ReservedKB columns. Perhaps storing an Int as an Int would be more efficient?

    In the 9GB OLTP live database I tested it against; Williams solution was the only one that found the largest table in the DB and listed it as the first row of the select. I tried ordering by Rows and TotalKB (ReservedKB).