This works fine by un-ticking this or by creating an aggregation before the insertion into the columnstore table. Could be other possible workarounds. Any ideas why a columnstore index is creating this? There is another index on the table no issues.
Columnstore index blocking/ lock with SSIS
A blocking/ locking situation within SSIS for columnstore indexes only. We are talking about 15K rows insertion so very small. Even 1000 rows can cause the issue
1.
The below inserts into TableTR and never completes. This is a simple SSIS Dataflow task.
Select * from Table1 a
inner join dbo.TableTR tr with (nolock) on a.[Transaction Reference Number] = tr.[Transaction Reference Number]
and a.[Submitting Entity ID] = tr.[Submitting Entity ID]
and a.[Executing Entity ID] = tr.[Executing Entity ID]
where tr.[Current_Flag] = 1
2.
Now if I do insert into TableTR_copy
Select * from Table1 a
inner join dbo.TableTR tr with (nolock) on a.[Transaction Reference Number] = tr.[Transaction Reference Number]
and a.[Submitting Entity ID] = tr.[Submitting Entity ID]
and a.[Executing Entity ID] = tr.[Executing Entity ID]
where tr.[Current_Flag] = 1
Then insert into TableTR
Select * from TableTR_copy that works fine with the columnstore.
No 2 works absolutely fine and is very quick.
No 1 only works if I drop the column store. So appears to be a block on the select caused by the insertion. I have managed to fix the issue by unclicking this flag below. This works fine if there is no columnstore index on the table. I can see the block spid on sp_who2. Very bizarre and can't see why a columnstore should cause this.
3 answers
Sort by: Most helpful
-
-
Erland Sommarskog 109.8K Reputation points MVP
2023-05-11T21:33:05.2433333+00:00 What does "SELECT @@version" report?
As I understand your post, sp_who and sp__who2 indicates blocking. Have you investigated what the blocking process is doing?
Since you are requesting a table lock, this mean any query running against the table will block you.
-
ZoeHui-MSFT 36,111 Reputation points
2023-05-12T07:13:42.4166667+00:00 Hi @panlondon1,
Table lock
Specify whether the table is locked during the load. The default value of this property is true.The table lock will block other processes using the table, including the other OLEDB Destinations within the SSIS package. Please have a double check.
Regards,
Zoe Hui
If the answer is helpful, please click "Accept Answer" and upvote it.