I am using Microsoft Sync-Framework 2.1 on a azure SQL database. The table I am provisioning for sync, has approx 1M records. When the sync scope is being created, sync framework creates a XXX_tracking table with one row per original record. Creating this table is very slow on azure. The query that is being executed looks like this:
INSERT INTO [Transactions_tracking]
([Id], [create_scope_local_id], [local_create_peer_key], [local_create_peer_timestamp], [update_scope_local_id], [local_update_peer_key]
, [sync_row_is_tombstone], [PointOfSaleId], [ExecutedTime])
SELECT [base].[Id], NULL, 0, @@DBTS+1, NULL, 0, 0, [base].[PointOfSaleId], [base].[ExecutedTime]
FROM [Transactions] [base] LEFT OUTER JOIN [Transactions_tracking] [side] ON [base].[Id] = [side].[Id] WHERE [side].[Id] IS NULL;
On SQL Express this takes 19s, while on azure with 50 DTUs it takes 619s which I really cannot explain.
Any ideas? Thanks Travis