简体   繁体   English

使用SQL Server Compact与专用SQL Server数据库的缺点

[英]Disadvantages of using SQL Server Compact versus dedicated SQL Server database

I'm wondering what the key differences between using a SQL Server Compact database ( .sdf ) and a full fledged database like for example SQL Server Express are? 我想知道使用SQL Server Compact数据库( .sdf )与完整的数据库(例如SQL Server Express)之间的主要区别是什么?

Are there any major performance issues, and if so, how big can the compact database get before starting to notice this? 是否有任何重大的性能问题,如果是这样,紧凑型数据库在开始注意到这个之前有多大?

When starting projects I find using a compact database a simple, straight forward and clean solution, when should I convert and move over to a dedicated database? 在启动项目时,我发现使用紧凑型数据库是一个简单,直接和干净的解决方案,何时应该转换并转移到专用数据库?

Lets try: 我们试试吧:

  • max 2 GB file size 最大2 GB文件大小
  • No stored procedures, triggers etc. 没有存储过程,触发器等。
  • No process but loaded into your AppDomain 没有进程但加载到您的AppDomain中
  • As far as I know, there is no cost based optimizer or query plans for queries 据我所知,查询没有基于成本的优化器或查询计划
  • Lack of concurrent access of multiple users at the same time 多个用户同时缺乏并发访问权限

The big issue here is, that CE is only a file on your system and you get access through a simple InApp-call using a dll. 这里最大的问题是,CE只是您系统上的一个文件,您可以通过使用dll的简单InApp调用来访问。 Thats it and in many scenarios this is enough. 这就是它,在许多情况下这已经足够了。 Many people would say, that you can switch to SQLS later but I don't think so. 很多人会说,你可以稍后切换到SQLS,但我不这么认为。 It's a complete different world! 这是一个完全不同的世界! CE is a single product in my eyes. CE是我眼中的单品。

Remember, that you need to deploy the CE-DLL when you wan't to publish your app! 请记住,当您不想发布应用程序时,需要部署CE-DLL!

SQL Compact doesn't support Stored Procedures. SQL Compact不支持存储过程。 You write all of your query directly in code. 您可以直接在代码中编写所有查询。 That's enough for me to choose the SQL Express. 这足以让我选择SQL Express。 Now, we have also the option of LocalDB that simplify the deployment scenarios. 现在,我们还可以选择LocalDB来简化部署方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM