Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 18 Jun 2009 @ 09:31:27 GMT


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


Subj:   Re: Determine Lock in a Table
 
From:   DWellman

Hi Ayush,

If you're getting an answer of "0 rows" and no error messages then the query has completed. Therefore the table cannot be locked (against your query).

By default an INSERT/SELECT will lock the target table for write. To run your SELECT query whilst the INSERT/SELECT is still running you will need to "lock for access".

Having done that you should get a non-0 answer once the insert phase of the processing has started. Remember that Teradata won't start the INSERT stage until the SELECT stage has completed (as shown in the Explain). If the SELECT takes 'n' hours to complete then you won't find any rows in the target table (assuming that it starts as empty - you didn't say) until after this time.

How long are you expecting this INSERT/SELECT to take ?


Cheers,

Dave

Ward Analytics Ltd: Information in motion ( www.ward-analytics.com )



     
  <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: 15 Jun 2023