Groups | Blog | Home
all groups > sql server (alternate) > march 2004 >

sql server (alternate) : SQL Server Page size question


s_laha NO[at]SPAM rediffmail.com
3/21/2004 10:57:06 PM
Hi all,

In SQL Server we have concept of Pages.
Page size is specified to be of 8k i.e., 8192 bytes. That consists of
following:

Page Header - 96 bytes
Data Rows
And
Row offsets

Now SQL Server online documentation says maximum size of one data row can be
8060 bytes.

If that is the case then 8192-8060-96 = 36

So, my question is Does SQL Server keep that 36 bytes for row offset (for
one row an offset requires 2 bytes) ?

If there is only one row to be accomodated in a page then can the maximum
size of a row not be extended to 6094 bytes (keeping 2 bytes for one offset)
?


This seems to be very silly question, I am sure there must be some logical
reason behind keeping this figure of 8060 bytes.

sql NO[at]SPAM hayes.ch
3/22/2004 2:23:11 AM
[quoted text, click to view]

As a complete guess, it's more efficient to establish a fixed maximum
row length, even if the theoretical maximum could be slightly larger
in some cases. There's no exact reason given for this in Books Online
(or in Inside SQL Server 2000), but I guess it's not an issue for most
people. Do you have a specific problem with fitting data into a row?
If so, maybe you could post some details, and someone may be able to
suggest an alternative solution.

sql NO[at]SPAM hayes.ch
3/22/2004 6:58:08 AM
[quoted text, click to view]

<snip>

No, that wasn't me. I would tell you if I remembered working with you,
but 'G' isn't much to go on. :-)

G
3/22/2004 10:31:40 AM
Are you the same Simon Hayes that works for Smarter Finance or Dry Media?
Or is it Webscript?

Cant remember, but I certainly recognise your name, think I have done some
work with a Simon hayes in the past.

G.



[quoted text, click to view]

AddThis Social Bookmark Button