Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Thu, 15 Mar 2007 @ 20:46:31 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Statistics and lock contention
 
From:   Walter, Todd A

This quote from the manual is not completely correct.

As of V2R4, we moved the locks on the dictionary tables to the end of the collect statement. The result is that they are acquired after all the stats collection work has been done and are held just long enough to update the dictionary rows. The contention with new queries is minimal and happens only during that short period at the end.

-----------------------------------------------

From the DBMS 6.1 SQL manual:

"When you perform a COLLECT STATISTICS statement, the system places an ACCESS lock on the table from which the demographic data is being collected. The system places row-hash-level WRITE locks on the DBC.TVFIELDS and DBC.INDEXES tables, respectively, while collecting statistics at the column and index levels. These lock prevent parsing of new requests against the data tables for which the statistics are being collected until the operation completes."


So contention will occur, new queries will not be able to parse once the write locks are placed. Inserts that start BEFORE the collect statistics statement obtains the write locks will run.



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020