home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,533 of 19,505   
   Lennart Jonsson to Erland Sommarskog   
   Re: question on clustered indexes in sql   
   02 Dec 11 08:32:30   
   
   From: erik.lennart.jonsson@gmail.com   
      
   On 2011-12-01 23:55, Erland Sommarskog wrote:   
   > Lennart Jonsson (erik.lennart.jonsson@gmail.com) writes:   
   >> If the index is clustered the data pages are ordered according to the   
   >> clustering index. When a row is inserted, db2 finds the page where the   
   >> row should reside. If the row does'nt fit there, db2 looks in a   
   >> neighbourhould of the page. If that does not succedd etheir, the row is   
   >> put at the end. In these cases a pointer to the chosen page is stored in   
   >> the page where the row should have been. If there are many "overflow"   
   >> pages in a table, additional I/O is required when reading pages, and a   
   >> reorg of the table should be performed.   
   >   
   > So the good news is that there are no page splits.   
   >   
   > The bad news is that scans along the clustered index can be jumping forth   
   > and back.   
   >   
   > Am I right?   
   >   
      
   Indeed, a typical rule of thumb is that when overflows (jumps) > 3% of   
   read rows, it's time to reorganize the table (and eventually indexes on   
   the table as well). There are other indicators of when reorg is needed,   
   but this is the one I use most.   
      
      
   /Lennart   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca