Tuesday, March 18, 2008

How much data is 1 Meg?

I wanted to know how much data you can store in a database if you have 1 Meg of space. I searched the web and found formulas and how to query the database for memory size. No general estimate. So I built a query and sampled about a hundred tables.

The column count and data types are going to change the memory for a row. I took a small table of twenty rows and one hundred columns with a mix of numbers and Varchar. It took 60k of space, which scales up to 333 rows. But 634 rows in the same table took up 912K. So there must be some base memory.

Approximately 700 rows of a 100 column database table is 1 Meg. A table with just a few columns could be over 1000 rows (Microsoft 2005 SQL Server).

No comments: