• I've been using one of these two methods. The Optimizer seems to be smart enough to know not to do the COUNT multiple times. However, I've never done an analysis of this method quite as deep as the one you've done here. Great job by the way, I may need to change what I'm doing.

    DECLARE @startRow INT ; SET @startrow = 50

    ;WITH cols

    AS

    (

    SELECT table_name, column_name,

    ROW_NUMBER() OVER(ORDER BY table_name, column_name) AS seq

    FROM [INFORMATION_SCHEMA].columns

    )

    SELECT table_name, column_name, (SELECT COUNT(*) FROM cols) AS TotRows

    FROM cols

    WHERE seq BETWEEN @startRow AND @startRow + 49

    ORDER BY seq

    For the other way, replace (SELECT COUNT(*) FROM cols) AS TotRows with (SELECT MAX(seq) FROM cols) AS TotRows.