SQL Server不释放物理内存 [英] SQL Server does not release Physical Memory

查看:631
本文介绍了SQL Server不释放物理内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,



问候。

您能告诉我们您对以下问题的看法:





我们在ERP应用程序中使用SQL 2012企业版。



我们有40左右GB中的数据库就是Datawarehouse。



每天在服务器上运行导入过程,并将数据从多个系统导入到目标数据库。 />


有不同的基于SQL的计算,涉及哪些表的聚合函数的更新等。



我们有表包含超过500万和2500万的记录。



Windows机器的服务器2008 R2为操作系统,20 GB内存为64位。



我们已经为SQL Server分配了12 GB。



我们的Web应用程序位于同一台服务器上。



问题陈述:



1)进口时运行时,SQL Server使用所有可用内存,因此它增加了服务器的物理内存



随着物理内存的增加,它也会影响Web应用程序的性能。



执行查询后,SQL Server不会释放物理内存。我只会在实例重新启动后才会发布。



(例如,如果我们从500万条记录表中获取记录,那么它需要内存但是一旦获取数据就不要发布了)



我们已经将索引应用于表格。



2)我们在某些地方使用MAX函数从表中获取MAX(日期),其中包含500万到2500万的记录。



请指导我们应该采用哪种方法关注。



I)使用MAX。



II)使用TOP 1 ...订购BY DESC。



请进一步指导我们上述两个问题。



先谢谢。

解决方案

感谢Muli G分享链接。

MSDN链接 [ ^

Dear All,

Greetings.
Could you please let us know your thoughts on below problem:


We are using SQL 2012 Enterprise Edition in our ERP application.

We have around 40 GB of database in the same which is kind of Datawarehouse.

There is import process which runs daily on the server and imports data from multiple systems to destination database.

There are different SQL based calculations,updation of tables involved which aggregate functions ,etc.

We have tables containing records more than 5 million and 25 million.

The windows machine has server 2008 R2 as OS and 20 GB RAM with 64 BIT.

We have allocated 12 GB to SQL Server.

We have our web application on the same server.

Problem Statements :

1) When the importing runs, SQL Server uses all the available memory and so it increases physical memory of the server.

As the physical memory gets increased, it affects the performance of the web application as well.

SQL server does not releases the physical memory once the query is executed. It only releases once the instance is restarted.

(E.g. If we fetch records from 5 million records table then it takes the memory but do not releases once data gets fetched)

We have applied indexes to the table.

2) We have used MAX function at some places to fetch MAX (Date) from table which contains records varies from 5 million to 25 million.

Please guide us which approach should we follow.

I) To use MAX.

II) To use TOP 1 ... ORDER BY DESC.

Please guide us further on above two problems.

Thanks in Advance.

解决方案

Thanks Muli G for sharing link.
MSDN link[^]


这篇关于SQL Server不释放物理内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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