简体   繁体   English

使用SQL Server Express的实体框架会缓慢添加记录

[英]entity-framework with SQL Server Express slow to add records

Currently using VS2013 Express and SQL Server 2012 Express, to prototype an application. 当前使用VS2013 Express和SQL Server 2012 Express对应用程序进行原型设计。 Either or both packages may be upgraded to paid versions later, as required. 根据需要,以后可以将其中一个或两个软件包都升级到付费版本。

I am fairly new to C#, but consider myself an intermediate-level VBA programmer for Excel/Access. 我对C#相当陌生,但是我认为自己是Excel / Access的中级VBA程序员。

The application will load a database with data. 该应用程序将使用数据加载数据库。 In the module I am currently developing, ~17k records are generated from each raw data file- this will be dramatically higher in the next module, however. 在我当前正在开发的模块中,每个原始数据文件都会生成约17,000条记录-但是,在下一个模块中,记录会大大增加。 But the loading process is PAINFULLY slow using the Entity Framework. 但是使用实体框架,加载过程非常缓慢。 A previous version used table adapters, and took a reasonable amount of time. 以前的版本使用表适配器,并且花费了相当长的时间。

As I understand, generating framework views might speed it up. 据我了解,生成框架视图可能会加快速度。 I have found several entries on this and other sites, including: 我在此站点和其他站点上找到了一些条目,包括:

Fastest Way of Inserting in Entity Framework Visual Studio 2013 and Entity Framework 在实体框架中插入最快的方法 Visual Studio 2013和实体框架

Is using the Framework even the best approach? 使用框架甚至是最好的方法吗? Are there things I can do within the confines of the Express versions of VS and SQL to optimize the performance? 在VS和SQL Express版本的范围内,我可以做些什么来优化性能吗?

您可以尝试编译Linq查询,或者尝试以其他任何方式使Entity更快,但不要浪费时间,在这种情况下请使用ADO.NET。

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

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