title: Teradata - how to select without locking writers? (LOCKING ROW FOR ACCESS vs. LOCKING TABLE FOR ACCESS)
body: <p>I am developing an application which fetches some data from a Teradata DWH. DWH developers told me to use <code>LOCK ROW FOR ACCESS</code> before all <code>SELECT</code> queries to avoid delaying writes to that table(s).</p>
  
  <p>Being very familiar with MS SQL Servers's <code>WITH(NOLOCK)</code> hint, I see <code>LOCK ROW FOR ACCESS</code> as its equivalent. However, <code>INSERT</code> or <code>UPDATE</code> statements do not allow using <code>LOCK ROW FOR ACCESS</code> (it is not clear for me why this fails, since it should apply for table(s) the statement selects from, not to the one I insert into):</p>
  
  <pre><code>-- this works
  LOCK ROW FOR ACCESS 
  SELECT Cols
  FROM Table
  
  -- this does not work
  LOCK ROW FOR ACCESS 
  INSERT INTO SomeVolatile
  SELECT Cols
  FROM PersistentTable
  </code></pre>
  
  <p>I have seen that <code>LOCKING TABLE ... FOR ACCESS</code> can be used, but it is unclear if it fits my need (<code>NOLOCK</code> equivalent - do not block writes).</p>
  
  <p><strong>Question:</strong> <strong>What hint should I use to minimize writes delaying when selecting within an <code>INSERT</code> statement?</strong></p>