SQL SERVER 2005 Ò³ÃæÎļþÍ·²¿½á¹¹
Next up in the Inside the Storage Engine series is a discussion of page structure. Pages exist to store records. A database page is an 8192-byte (8KB) chunk of a database data file. They are aligned on 8KB boundaries within the data files, starting at byte-offset 0 in the file.
Here's a picture of the basic structure
Header
The page header is 96 bytes long. What I'd like to do in this section is take an example page header dump from DBCC PAGE and explain what all the fields mean. I'm using the database from the page split post and I've snipped off the rest of the DBCC PAGE output.
DBCC
TRACEON (3604)DBCC
PAGE ('pagesplittest', 1, 143, 1);GO
m_pageId = (1:143) m_headerVersion = 1 m_type = 1
m_typeFlagBits = 0x4 m_level = 0 m_flagBits = 0x200
m_objId (AllocUnitId.idObj) = 68 m_indexId (AllocUnitId.idInd) = 256
Metadata: AllocUnitId = 72057594042384384
Metadata: PartitionId = 72057594038386688 Metadata: IndexId = 1
Metadata: ObjectId = 2073058421 m_prevPage = (0:0) &
Ïà¹ØÎĵµ£º
1¡¢ SQL×¢Èë¹¥»÷µÄ±¾ÖÊ£ºÈÿͻ§¶Ë´«µÝ¹ýÈ¥µÄ×Ö·û´®±ä³ÉSQLÓï¾ä£¬¶øÇÒÄܹ»±»Ö´ÐС£
2¡¢ ÿ¸ö³ÌÐòÔ±¶¼±ØÐë¼ç¸ºÆð·ÀÖ¹SQL×¢Èë¹¥»÷µÄÔðÈΡ£
¡¡¡¡ËµÆð·ÀÖ¹SQL×¢Èë¹¥»÷£¬¸Ð¾õºÜÓôÃÆ£¬Õâô¶àÄêÁË´ó¼ÒÒ»Ö±ÔÚÌÖÂÛ£¬Ò²Ò»Ö±ÔÚÕùÂÛ£¬¿ÉÊǵ½ÁËÏÖÔÚËƺõ»¹ÊÇûÓж¨ÂÛ¡£µ±²»ÖªµÀ×¢ÈëÔÀíµÄʱºò»á¾õµÃºÜÉñÆ棬Ôõô¾Í±»×¢ÈëÁËÄØ£¿ ......
SELECT * from user WHERE name LIKE '%Èý%';
½«»á°ÑnameΪ“ÕÅÈý”£¬“Èý½Å蔣¬“ÌÆÈý²Ø”µÈµÈÓГÈý”µÄÈ«ÕÒ³öÀ´£»
ÔÚ½øÐÐÊý¾Ý¿â²éѯʱ£¬ÓÐÍêÕû²éѯºÍÄ£ºý²éѯ֮·Ö¡£
Ò»°ãÄ£ºýÓï¾äÈçÏ£º
SELECT ×ֶΠfrom ±í WHERE ij×ֶΠLike Ìõ¼þ
ÆäÖйØÓÚÌõ¼þ£¬SQLÌṩÁËËÄÖÖÆ¥ÅäÄ£Ê ......
ÔÚÁ¬½ÓSQL Server 2000Êý¾Ý¿âʱ£¬ÏµÍ³ÌáʾÈçÏ´íÎó£º
ÔÚÍøÉÏÑ°ÕÒµ½´¦Àí·½·¨£º
(°ÑSQL server updateµ½sp4)
1¡¢ÔÚ²éѯ·ÖÎöÆ÷ÖÐÊäÈë select @@version ²¢Ö´ÐÐ
SQL Server 2000 °æ±¾ºÍ¼¶±ð
@@VERSION
²úÆ·¼¶±ð
SQL Server 2000 Ôʼ°æ±¾
8.00.194
RTM
Database Components SP1
8.00.384
SP1 ......