• Status: Solved
• Priority: Medium
• Security: Public
• Views: 3427

# 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
0
anushahanna
5 Solutions

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

SQL Server DBA & ArchitectCommented:
>> 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: