Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 pages and extents

Author  Topic 

booyeeka
Starting Member

10 Posts

Posted - 2008-03-16 : 10:37:10
hi all!

i'm not sure that i understand how sql server stores data.

in documentation, i found that sql server stores data in pages.

every page have size of 8192 bytes (8060).

as i understand well, every table row is stored in one page. also, every table row can not be larger then one page. and that's where my confusion starts - because it sounds like we can not have data in table that is larger then 8060.

please, if you can you help me to understand this.

thank you in advance!


dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2008-03-16 : 11:36:42
A table can take up multiple pages. Take a look at BOL on pages and extents here: http://msdn2.microsoft.com/en-us/library/ms190969.aspx



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-03-16 : 17:00:56
>> it sounds like we can not have data in table that is larger then 8060.

Correct except blob, which can hold 2g bytes and be stored in separate pages.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-03-16 : 17:03:34
lets not forget the new varchar(max), nvarchar(max) and varbinary(max) datatypes that
when larger than 8k uses overflow pages.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -