大量连续insert 表 sql server 占用大量内存 如何释放?

chinawcs 2010-08-13 02:29:29
本来 内存占用 六百多M 可 执行完 后 达到了 1.3G


我计算机 是2G内存的



把程序关了 也没有 释放内存
重启了下 sql server 内存才降下来了



我担心 如果 数据量再大 计算机 会不会报内存不够呀




...全文
577 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
chinawcs 2010-08-16
  • 打赏
  • 举报
回复
我的 只是 insert 语句 不设计 导入导出


提示 bcp 语法不对
chinawcs 2010-08-16
  • 打赏
  • 举报
回复
大家 能不能 举个例子呢 bcp insert 怎么写

我是执行的 大量 sql 不是 导入导出 文本文件

chinawcs 2010-08-14
  • 打赏
  • 举报
回复
做 sql server 内存限制 会不会影响 性能

进而减慢导入速度呢 ?

我的 sql 语句都是 客户端 组配成的 没用过bcp 执行sql 不知是否可行
Rotel-刘志东 2010-08-14
  • 打赏
  • 举报
回复
大量插入不应该用insert,这样会增加系统负担。最好用bcp操作
jinjazz 2010-08-13
  • 打赏
  • 举报
回复
大量插入建议用bcp
Q315054403 2010-08-13
  • 打赏
  • 举报
回复
设定最大内存使用。。。不要紧张
guguda2008 2010-08-13
  • 打赏
  • 举报
回复
应该是导完了不会及时释放,但系统再需要用的时候SQL会把不用的内存释放掉吧。
obuntu 2010-08-13
  • 打赏
  • 举报
回复
内存不够时,系统会自动page fault,导致变得慢,不用怎么担心会报内存不够。
你要做的是尽量使用小批量insert吧。
飘零一叶 2010-08-13
  • 打赏
  • 举报
回复

@Echo ====================内存开始释放====================
@Rem @主要是用来隐藏所执行的程序,不让它在命令窗口显示执行的程序内容

@Rem 释放.Net空闲内存
@Empty.exe w3wp.exe
@Empty.exe lsass.exe
@Empty.exe mdm.exe
@Empty.exe mssearch.exe
@Empty.exe notepad.exe
@Empty.exe services.exe
@Empty.exe smss.exe
@Empty.exe spoolsv.exe
@Empty.exe svchost.exe
@Empty.exe taskmgr.exe
@Empty.exe winasse.exe
@Empty.exe winlogon.exe
@Empty.exe wmiprvse.exe
@Empty.exe rfwmain.exe
@Empty.exe rfwsrv.exe
@Empty.exe QQ.exe
@Empty.exe devenv.exe
@Empty.exe SqlServr.exe
@Empty.exe MsMpEng.exe
@Empty.exe CodeSmithStudio.exe
@Empty.exe iexplore.exe
@Empty.exe ThunderService.exe
@Empty.exe Thunder.exe

自己写个批处理,然后在网上下个empty.exe 放在SYSYTEM32下面就行了。
chinawcs 2010-08-13
  • 打赏
  • 举报
回复
一定要 定时 重启服务嘛 ?

如果 我写的程序 需要写入几百万 条数据 那 Sql server 会怎么样

guguda2008 2010-08-13
  • 打赏
  • 举报
回复
恩,重启一下的好。如果是服务器的话最好只运行一个SQL服务,别的程序都别跑。。。
claro 2010-08-13
  • 打赏
  • 举报
回复
如果是我也会
>net stop mssqlserver
>net start mssqlserver

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧