积极答复者
EF实体框架内存占用问题

问题
答案
-
Hello,
>>只要使用了EF,SQL Server的内存占用就和我的数据库文件大小成正比
Entity Framework会cacaheds是数据库到本地,如果你的数据库很大的话,那是有可能内存占用随着数据库文件变大而变大。不过据我所知,占用内存的应该是你hostEF的应用程序,数据库的内存是不会被影响到的,对于数据库的内存为什么会增大,我建议你去sql sever的论坛问这个issue.
我的建议是你可以每个数据库请求使用一个context对象,用完后就释放掉。
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已建议为答案 Leo (Apple) Yang 2015年5月4日 9:36
- 已标记为答案 Fred BaoModerator 2015年5月5日 8:58
全部回复
-
Hello,
>>只要使用了EF,SQL Server的内存占用就和我的数据库文件大小成正比
Entity Framework会cacaheds是数据库到本地,如果你的数据库很大的话,那是有可能内存占用随着数据库文件变大而变大。不过据我所知,占用内存的应该是你hostEF的应用程序,数据库的内存是不会被影响到的,对于数据库的内存为什么会增大,我建议你去sql sever的论坛问这个issue.
我的建议是你可以每个数据库请求使用一个context对象,用完后就释放掉。
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已建议为答案 Leo (Apple) Yang 2015年5月4日 9:36
- 已标记为答案 Fred BaoModerator 2015年5月5日 8:58