# 8-KB into MB

Why does SQL server use quantities in 8-KB, instead of 1KB or 1 extent? what is the significance of 8-KB?

I was looking to convert into MB/GB, but is always confusing why it is not in KB.

So if SQL gives me a quantity in 8-KB, I should divide it by (8*1024) to get in MB, right?

thanks
LVL 6
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mb=bytes\1024\1024
bytes divided by 1048576 equals megabytes.
there are 1024 bytes in a kilobyte
there are 1024 kilobytes in a megabyte
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

SQL Server DBA & Architect, EE Solution GuideCommented:
>> Why does SQL server use quantities in 8-KB

It was the fundamentals on which SQL Server works. And more info no why /how it works here:
http://technet.microsoft.com/en-us/library/ms190969.aspx

>> 8-KB, I should divide it by (8*1024) to get in MB, right?

Or more simply, Multiply it with 128
0
Commented:
--> So if SQL gives me a quantity in 8-KB, I should divide it by (8*1024) to get in MB, right?

Correct.

Not sure what SQL server is giving you in 8KBs, but you are correct.

If SQL server says it has 10,000 items at 8KB per item that would be 80,000 KB which would be 80,000 / 1024 = 78.125 MB.

0
page is  the fundamental datastructure in sql server ; sql server will always reads and writes 8k chunks of data
0
Commented:
>>Why does SQL server use quantities in 8-KB, instead of 1KB or 1 extent? what is the significance of 8-KB?

Even though the basic level of storage starts at page level (ie 8 KB), SQL Server always allocated in extents (ie 8*8KB = 64 KB). This is the basic behavior of SQL Server.

>>So if SQL gives me a quantity in 8-KB, I should divide it by (8*1024) to get in MB, right?

As 1 MB = 1024 KB, 1 KB = 1/1024 MB, 8 KB = (8/1024) MB

Also as 1 GB = 1024 MB, 1 MB = 1/1024 GB, 1 KB = (1/1024)/1024 GB

Hope this clarifies
0
Author Commented: