title: TSQL : Timeouts on High traffic table
body: <p>I'm having issues with timeouts of a table on mine.</p>
  
  <p>Example table:</p>
  
  <pre><code>Id BIGINT, 
  Token uniqueidentifier, 
  status smallint, 
  createdate datetime, 
  updatedate datetime
  </code></pre>
  
  <p>I'm inserting data into this table from 2 different stored procedures that are wrapped with transaction (with specific escalation) and also 1 job that executes once every 30 secs.</p>
  
  <p>I'm getting timeout from only 1 of them, and the weird thing that its from the simple one</p>
  
  <pre><code>BEGIN TRY
  BEGIN TRAN
     INSERT INTO [dbo].[TempTable](Id, AppToken, [Status], [CreateDate], [UpdateDate])
     VALUES(@Id, NEWID(), @Status, GETUTCDATE(), GETUTCDATE() )
     COMMIT TRAN
  END TRY 
  BEGIN CATCH
     IF @@TRANCOUNT &gt; 0 
        ROLLBACK TRAN;
  END CATCH
  </code></pre>
  
  <p>When there is some traffic on this table (<code>TempTable</code>) this procedure keeps getting timeout.</p>
  
  <p>I checked the execution plan and it seems I haven't missed any indexes in both stored procedures.</p>
  
  <p>Also, the only index on <code>TempTable</code> is the clustered PK on <code>Id</code>.</p>
  
  <p>Any ideas?</p>
  
  <p>If more information is needed, do tell.</p>
  
  <p>The 2nd stored procedure using this table isn't causing any big IO or something.</p>
  
  <p>The job, however, uses an atomic <code>UPDATE</code> on this table and in the end of it <code>DELETE</code>s from the table, but as I checked on high IO of this table, the job takes no longer than 3 secs.</p>
  
  <p>Thanks.</p>