达梦数据库查询占用大内存的SQL
时间: 2023-11-30 15:05:15 浏览: 140
达梦数据库表占用磁盘空间统计.sql
5星 · 资源好评率100%
在达梦数据库中,可以使用视图V$LARGE_MEM_SQLS来监控占用大内存的SQL语句。该视图会记录使用内存超过设定阈值的SQL语句,并保留最近的1000条记录。可以通过以下语句对大内存SQL进行排序:
SELECT * FROM V$LARGE_MEM_SQLS ORDER BY MEM_USED_BY_K DESC;
通过查询V$LARGE_MEM_SQLS视图,可以查看占用内存最多的SQL语句及其相应的内存使用情况。这可以帮助我们定位到占用大内存的SQL语句,并进行相关的性能优化。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [达梦数据库大内存SQL定位和监控](https://blog.csdn.net/robo23/article/details/122796844)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [【达梦数据库】DM内存结构与SQL执行](https://blog.csdn.net/weixin_44559140/article/details/127633917)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文