February 3, 2017 at 7:35 am
How many rows does a database contain in 1TeraByte?
February 3, 2017 at 7:45 am
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
February 3, 2017 at 8:03 am
susmitha117 - Friday, February 3, 2017 7:35 AMHow 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
February 3, 2017 at 8:04 am
Thom A - Friday, February 3, 2017 7:45 AMIf 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
February 3, 2017 at 8:06 am
susmitha117 - Friday, February 3, 2017 7:35 AMHow 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....😉
February 3, 2017 at 8:11 am
GilaMonster - Friday, February 3, 2017 8:04 AMThom A - Friday, February 3, 2017 7:45 AMIf 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
February 3, 2017 at 8:55 am
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
February 3, 2017 at 4:18 pm
susmitha117 - Friday, February 3, 2017 7:35 AMHow many rows does a database contain in 1TeraByte?
Heh.... "42".
--Jeff Moden
Change is inevitable... Change for the better is not.
February 5, 2017 at 2:00 am
Jeff Moden - Friday, February 3, 2017 4:18 PMsusmitha117 - Friday, February 3, 2017 7:35 AMHow 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