哪个sql server版本是使用实体框架代码快速保存数据的最佳版本?

时间:2022-09-15 17:45:07

I'm quite new to the DB subject, I hope my question is ok.

我对DB科目很陌生,我希望我的问题可以。

I want to build an application with a Database using entity framework code first.

我想先使用实体框架代码构建一个带有数据库的应用程序。

Info about the DB I will have:

关于DB我将拥有的信息:

  • Each day a new DB is created.
  • 每天都会创建一个新的DB。
  • A DB will contain approximately 9 tables, each of them has max 50 columns.
  • DB将包含大约9个表,每个表最多有50列。
  • The total DB file size should be about 2GB.
  • DB文件的总大小应该在2GB左右。
  • The application will save data for 7 hours straight each day.
  • 应用程序将每天连续保存7小时的数据。

In the application will be 2 threads - one for creating the data and putting it in a buffer, and one for taking the data from the buffer and saving it in the Database.

在应用程序中有两个线程——一个用于创建数据并将其放入缓冲区,另一个用于从缓冲区获取数据并将其保存在数据库中。

My primary requirement is that the SaveChanges() function will finish as fast as possible since there is a lot of data that needed to be saved per day, and I'm afraid the "saving data" thread will not be as fast as the "creating data" thread and so the buffer will be overflowed.

我的主要要求是,SaveChanges()函数将尽快完成,因为有很多数据需要保存,每天,恐怕“保存数据”线程不会尽快“创建数据”线程和缓冲区溢出。

which sql server edition should I use?

我应该使用哪个sql server版本?

2 个解决方案

#1


2  

The fastest one is going to be the most expensive one - i.e. the one that supports the most memory, most cores, most CPU's( assuming you give it all that hardware to use, otherwise it won't really matter). On the same piece of hardware, licensing aside, the various editions (except CE) should run at the same level of performance. The question really should be, which one is fast enough...and we don't have enough information to answer that. Otherwise you may be throwing a lot of money at a software license (and hardware) to get performance you may not need and/or that you could get by optimizing and/or changing some code.

最快的一个将是最昂贵的一个——也就是支持最多内存、最多内核、最多CPU(假设你把所有硬件都用了,否则就不重要了)。除了许可之外,在同一块硬件上,不同版本(除了CE)应该运行在相同的性能级别上。问题是,哪一个足够快……我们没有足够的信息来回答这个问题。否则,您可能会花很多钱在软件许可(和硬件)上,以获得您可能不需要的性能,或者您可以通过优化和/或更改一些代码获得性能。

#2


1  

You should be able to use almost any version of SQL Server. Here is a comparison chart for the current versions on SQL Server: http://msdn.microsoft.com/en-us/library/cc645993(v=SQL.110).aspx If you look there the express version only allows a 10GB limit on a database. So the express version seems good to start at, but if you get close to 10GB or want it a little faster look into the standard version.

您应该能够使用几乎任何版本的SQL Server。下面是SQL Server上当前版本的比较图:http://msdn.microsoft.com/en-us/library/cc645993(v=SQL.110).aspx如果您查看的话,可以看到express版本只允许对数据库进行10GB的限制。因此,快速版本似乎是一个很好的开始,但是如果你想要接近10GB,或者想让它快一点,看看标准版本。

#1


2  

The fastest one is going to be the most expensive one - i.e. the one that supports the most memory, most cores, most CPU's( assuming you give it all that hardware to use, otherwise it won't really matter). On the same piece of hardware, licensing aside, the various editions (except CE) should run at the same level of performance. The question really should be, which one is fast enough...and we don't have enough information to answer that. Otherwise you may be throwing a lot of money at a software license (and hardware) to get performance you may not need and/or that you could get by optimizing and/or changing some code.

最快的一个将是最昂贵的一个——也就是支持最多内存、最多内核、最多CPU(假设你把所有硬件都用了,否则就不重要了)。除了许可之外,在同一块硬件上,不同版本(除了CE)应该运行在相同的性能级别上。问题是,哪一个足够快……我们没有足够的信息来回答这个问题。否则,您可能会花很多钱在软件许可(和硬件)上,以获得您可能不需要的性能,或者您可以通过优化和/或更改一些代码获得性能。

#2


1  

You should be able to use almost any version of SQL Server. Here is a comparison chart for the current versions on SQL Server: http://msdn.microsoft.com/en-us/library/cc645993(v=SQL.110).aspx If you look there the express version only allows a 10GB limit on a database. So the express version seems good to start at, but if you get close to 10GB or want it a little faster look into the standard version.

您应该能够使用几乎任何版本的SQL Server。下面是SQL Server上当前版本的比较图:http://msdn.microsoft.com/en-us/library/cc645993(v=SQL.110).aspx如果您查看的话,可以看到express版本只允许对数据库进行10GB的限制。因此,快速版本似乎是一个很好的开始,但是如果你想要接近10GB,或者想让它快一点,看看标准版本。