CreateSchema very slow for existing tables RRS feed

  • Question

  • Hi

    We have an existing CE database with about 90 tables in it. We need to call the CreateSchema command (with SyncSchema=null and each SyncTable set to UseExistingTableOrFail), in order to register the table for change tracking.

    I am finding there is a lot of time and CPU spent calling this CreateSchema for all the tables.

    Is this necessary? Is there another function I can call (e.g. I notice the private EnableOcsTracking looks like it could be useful) ?

    • Moved by Max Wang_1983 Friday, April 22, 2011 5:05 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, November 2, 2007 11:56 AM

All replies

  • Well, as a test, I'm calling the EnableOcsTracking via reflection (passing in the Tracking = PK, not ROWGUID), and it's substantially faster.

    I'm just guessing, but it would appear the lookups on the system tables to determine the tracking type are very slow.

    Friday, November 2, 2007 1:53 PM
  • Hi

    Can you explain please what you did in more details.


    Thanks a lot


    Monday, August 18, 2008 2:55 AM
  • I am stuck on not being able to find a way to pass in the SETTRACKINGTYPE.PK enum, which is internal, to InvokeMember. It doesn't like a simple numeric value of 1.


    Can you share your cool magic?

    Thursday, September 18, 2008 4:13 PM