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

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
Asked:
anushahanna
5 Solutions
 
luc_roySystem AdminCommented:
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
 
Raja Jegan RSQL 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
 
giltjrCommented:
--> 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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Aneesh RetnakaranDatabase AdministratorCommented:
page is  the fundamental datastructure in sql server ; sql server will always reads and writes 8k chunks of data
0
 
geek_vjCommented:
>>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
 
anushahannaAuthor Commented:
helpful. thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now