0

I have table with clustered columnstore index and partitions When i`m try to insert data into it with tablock hint, query got a deadlock.

INSERT INTO Cohort_Staging WITH (TABLOCK) (
            [RegistrationDate],[DepositDate]
            )
SELECT bk.[RegistrationDate]
    , bk.DepositDate AS DepositDate

In the Deadlock Graph i see, that process locks itself. Is it normal behaviour?

Microsoft SQL Server 2017 (RTM-GDR) (KB4583456) - 14.0.2037.2 (X64)   Nov  2 2020 19:19:59   
Copyright (C) 2017 Microsoft Corporation  Standard Edition (64-bit) on Windows Server 2016 
Standard 10.0 <X64> (Build 14393: ) 
1
  • Is that the full query? Can you show us the table and index definitions, and please share the query plan via brentozar.com/pastetheplan. Side note: Is there any reason you are on the GDR train of SQL Server build, rather than the CU train? The GDR train only contains security fixes. Jun 17 at 8:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.