没啥数据的新表放混合区,如果表数据量足够放8页,而且做了索引重建之类的动作,就放统一区了

解决方案 »

  1.   


    有数据且数据量很小的时候呢?
      

  2.   

    太抽象的文字,看看着就想睡,用的时候好像没太注意这些细节。反正现在硬盘很便宜,能大就大点呗。
      

  3.   

    DBCC TRACEON(3604,1)
    DBCC IND(AdventureWorks2012,test,1)
    --得到結果中pagetype為10的為IAM頁 , 我這邊為PagePID 24130
    --查看IAM頁的內容,數據量少時
    DBCC PAGE(AdventureWorks2012 , 1 , 24130 , 3)
    /*
     IAM: Single Page Allocations @0x000000000F4AA08E   --8個單獨分配頁的分配情況Slot 0 = (1:24124)                  Slot 1 = (0:0)                      Slot 2 = (0:0)
    Slot 3 = (0:0)                      Slot 4 = (0:0)                      Slot 5 = (0:0)
    Slot 6 = (0:0)                      Slot 7 = (0:0)                      
    IAM: Extent Alloc Status Slot 1 @0x000000000F4AA0C2  --統一區的分配情況(1:0)        - (1:28280)    = NOT ALLOCATED   
     */
     --再插入一些數據
     INSERT INTO test (  productid,  orderid,shipmentquantity, valueid,valuestr, productname )
     VALUES (  3,  '8',  8,  '8',  'aaaaaaaaa',  'bbbbbbb' )
     GO 1000
     --再看看IAM頁的情況
     DBCC PAGE(AdventureWorks2012 , 1 , 24130 , 3)
     /*
      IAM: Single Page Allocations @0x000000000B24A08E --8個單獨分配頁都已經用掉了Slot 0 = (1:24124)                  Slot 1 = (1:24131)                  Slot 2 = (1:24132)
    Slot 3 = (1:24133)                  Slot 4 = (1:24342)                  Slot 5 = (1:24343)
    Slot 6 = (1:24360)                  Slot 7 = (1:24361)                  
    IAM: Extent Alloc Status Slot 1 @0x000000000B24A0C2 --統一區的分配情況(1:0)        - (1:24360)    = NOT ALLOCATED                              
    (1:24368)    -              =     ALLOCATED      --已經分配                       
    (1:24376)    - (1:28280)    = NOT ALLOCATED   
      */樓主這是我做了一些測試後的結果,給你參考參考
    可以看一下大神的blog http://blog.csdn.net/misterliwei/article/details/5943447
      

  4.   


    有数据且数据量很小的时候呢?
    混合区