Does the Microsoft Sync Framework allow syncing of non-clustered indexes from the server to clients? RRS feed

  • Question

  • We are using the Microsoft Sync Framework to synchronize tables and data between a SQL Server 2008 R2 DB and local SQL CE DBs on WPF based desktop clients to enable local processing scenarios, however we are running into one issue that seems very strange that I’m hoping you could assist in getting an answer to from the official source.

    In the Microsoft Sync Framework (2.0 or 4.0) is it possible to get non-clustered indexes that are not the primary key to sync from the server (SQL Server 2008 R2) to the client (SQL CE 3.5 or 4.0)?  We see the primary key indexes get automatically created, we can sync data in either direction, etc., but indexes that are not the PK are not getting created on the local client when they exist on the server.  The performance on the local client on some more complex queries that require a few joins is remarkably poor without the indexes, e.g. in the minutes for a query that takes less than 5 seconds when the indexes are added.

    Is there something we need to be sure to do to allow all indexes to be copied from the server to the client by the framework or do indexes need to manually be created by our code (this seems like a strange architectural choice not to allow indexes to be synced, but if that’s the case I’d be interested to find out the reasoning behind this)?

    Our project is a Prism based WPF application written in C#.

    Thursday, March 10, 2011 3:44 PM

All replies

  • Sync Fx does not synchronize schema or indexes, so you will have to handle it manually. the PKs are created because it uses it to uniquely identify each row.
    • Proposed as answer by Ganeshan Friday, March 11, 2011 9:42 PM
    Thursday, March 10, 2011 11:12 PM