• Tac11 (2/27/2015)


    In my database there is a big table and format is something like this:

    CREATE TABLE [dbo].[MyTable](

    [aaa] [uniqueidentifier] NULL,

    [bbb] [uniqueidentifier] NULL,

    [ccc] [nvarchar](max) NULL,

    [ddd] [nvarchar](100) NULL,.......etc.........

    There are some more columns with more 'nvarchar' (max) and other INT data types. Anyway, I know a page is 8K size. How do I find out how much space does A ROW takes with above datatypes? If users add 5000 Rows per day, how do I figure out how much size the table will increase?

    Thank you.

    Wouldn't it be easier to just check the size of the whole table using something like sp_SpaceUsed and then divide that by the number of the rows in the table to come up with an average row size?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)