Microsoft Sync Framework是否允许将非聚集索引从服务器同步到客户端? [英] Does the Microsoft Sync Framework allow syncing of non-clustered indexes from the server to clients?

查看:85
本文介绍了Microsoft Sync Framework是否允许将非聚集索引从服务器同步到客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Microsoft Sync Framework在基于WPF的桌面客户端上的SQL Server 2008 R2数据库和本地SQL CE数据库之间同步表和数据,以启用本地处理方案,但是我们遇到了一个似乎问题的问题非常奇怪
,我希望你能帮助从官方来源获得答案。

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.

在Microsoft Sync Framework(2.0或4.0)中是它是否可以获得非聚集索引,这些索引不是从服务器(SQL Server 2008 R2)同步到客户端(SQL CE 3.5或4.0)的主键? 我们看到主键索引自动创建了
,我们可以在任一方向同步数据等,但是当服务器上存在非本地客户端时,不会创建非PK的索引。 一些更复杂的查询需要
几个连接的本地客户端上的性能在没有索引的情况下非常差,例如在添加索引时,查询的分钟数小于5秒。

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.

我们需要确保将所有索引从服务器复制到框架或客户端的客户端需要手动创建我们的代码(这似乎是一个奇怪的架构选择,不允许索引是
同步,但如果那是’ s’ d有兴趣找到这背后的推理)?

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)?

我们的项目是一个用C#编写的基于Prism的WPF应用程序。

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

推荐答案

Sync Fx不会同步架构或索引,因此您必须手动处理它。创建PK是因为它使用它来唯一标识每一行。
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.


这篇关于Microsoft Sync Framework是否允许将非聚集索引从服务器同步到客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆