Home  >  Article  >  Database  >  通过绑定变量优化OLTP系统性能

通过绑定变量优化OLTP系统性能

WBOY
WBOYOriginal
2016-06-07 16:44:24995browse

之前给南京某客户优化一套OLTP数据库,其数据库中在某个时间段,会执行大量结构非常相似的查询语句,造成shared_pool被大量占用,

分析:刚才的那段PL/SQL的语句被硬解析了10000次,并且执行了10000次,CPU总共消耗了6.26+0.23=6.50,花费时间6.53+0.26=6.79,可以看到,在trace文件中共有90068行,由于同样结构的SQL语句,未使用绑定变量,使Oracle认为每个语句都不同,因此产生了非常多的SQL语句,,zlm01.log日志文件大小约为12M

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn