1 Tb is How many rows in a databse

  • How many rows does a database contain in 1TeraByte?

  • As many or as few as you want. Rows aren't of a fixed size. If you had a table, containing 1 column, and data type BIT, each row will be 1 Byte in size. There's 1,099,511,627,776 Bytes in a Terabyte.

    have a table with 56 columns, of varying datatypes, it all depends what those datatypes are, and how much is stored in them.

    Plus, you have indexes to take into consideration, views, function/procedures, etc, etc, etc, etc.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • susmitha117 - Friday, February 3, 2017 7:35 AM

    How many rows does a database contain in 1TeraByte?

    No way to answer that question. I could get 2TB in a single row with enough work.
    Completely depends on the data types used and how many tables and indexes there are.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thom A - Friday, February 3, 2017 7:45 AM

    If you had a table, containing 1 column, and data type BIT, each row will be 1 Byte in size.

    Minimum size of a row is, iirc, 3 bytes due to row headers, plus you get the page header and footer, so there's overhead.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • susmitha117 - Friday, February 3, 2017 7:35 AM

    How many rows does a database contain in 1TeraByte?

    As many as there are in there, number of rows and database sizes are not strongly coupled numbers,there are indices, dead space, row sizes, compression etc. etc. to take into the equation. I have worked on databases with only few thousand rows which were many terabytes and also databases not even reaching 100Gb which had billions of rows.
    😎

    The question is as clever as going to a shop and ask how much before making anykind of a product selection....😉

  • GilaMonster - Friday, February 3, 2017 8:04 AM

    Thom A - Friday, February 3, 2017 7:45 AM

    If you had a table, containing 1 column, and data type BIT, each row will be 1 Byte in size.

    Minimum size of a row is, iirc, 3 bytes due to row headers, plus you get the page header and footer, so there's overhead.

    I did wonder, but I had a Google of "\What is the minimum storage space a row will use in SQL Server" and everything returned was about maximum size, not minimum.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • For traditional RowStore tables, it depends on the column definition, data types, and other factors like compression, page fill, and fragmentation. I once say a table with only about 150,000 rows grow to 1 TB, because they were containing a 5 MB PDF document for each row. The image for each document was identical, except for the signature.

    For a ColumnStore table, all bets are off, but basically it will squeeze the same data into about 10% of the physical storage space.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • susmitha117 - Friday, February 3, 2017 7:35 AM

    How many rows does a database contain in 1TeraByte?

    Heh.... "42".

    --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)

  • Jeff Moden - Friday, February 3, 2017 4:18 PM

    susmitha117 - Friday, February 3, 2017 7:35 AM

    How many rows does a database contain in 1TeraByte?

    Heh.... "42".

    +42 😀
    😎

Viewing 9 posts - 1 through 8 (of 8 total)

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