If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > "The maximum size of a row is 8kb?"

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-11, 20:17
CptSuperMrkt CptSuperMrkt is offline
Registered User
 
Join Date: Sep 2010
Posts: 22
"The maximum size of a row is 8kb?"

I'm reading up on the structure of SQL data, how the data is stored and whatnot, and I came across this site: SQL Server Data Structure One of the very first things it says is that a row can only reside on one Page, each Page can only contain 8kb of information, and thus due to this, the maximum size of a row is 8kb.

Makes sense, but what bothers me is that I can store more than 8kb of information in a row using nvarchar(max) and whatnot. I just created a 100kb .txt file and copy/pasted that into one field of one row in my database, and sure enough, it accepted it and it works.

So how can each page only be 8kb, and each row can only utilize one page, and yet still somehow manage to fit data much larger than 8kb?
Reply With Quote
  #2 (permalink)  
Old 02-16-11, 03:40
aflorin27 aflorin27 is offline
Registered User
 
Join Date: Apr 2008
Location: Iasi, Romania
Posts: 317
Here: Understanding Pages and Extents
there is a Large Row Support paragraph that answers your question.
__________________
Florin Aparaschivei
Iasi, Romania
Reply With Quote
  #3 (permalink)  
Old 02-17-11, 09:50
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
In short, large datatypes may be stored separate from the data page for the record, with the record only holding a pointer to the location of the actual blob.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On