- 1、本文档共5页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
TKPROF学习
TKPROF学习Tkprof工具可用来格式化sql trace产生的文件,让你更容易看懂trace的内容 用法: tkprof tracefile outputfile [explain= ] [table= ] [print= ] [insert= ] [sys= ] [sort= ] ... 参数说明: tracefile:你要分析的trace文件 outputfile:格式化后的文件 explain=user/password@connectstring table=schema.tablename 注1:这两个参数是一起使用的,通过连接数据库对在trace文件中出现的每条sql语句查看执行计划,并将之输出到outputfile中 注2:该table必须是数据库中不存在的,如果存在会报错 print=n:只列出最初N个sql执行语句 insert=filename:会产生一个sql文件,运行此文件可将收集到的数据insert到数据库表中 sys=no:过滤掉由sys执行的语句 record=filename:可将非嵌套执行的sql语句过滤到指定的文件中去 waits=yes|no:是否统计任何等待事件 aggregate=yes|no:是否将相同sql语句的执行信息合计起来,默认为yes sort= option:设置排序选项,选项如下: prscnt:number of times parse was calledprscpu:cpu time parsingprsela:elapsed time parsingprsdsk:number of disk reads during parseprsqry:number of buffers for consistent read during parseprscu:number of buffers for current read during parseprsmis:number of misses in library cache during parseexecnt:number of execute was calledexecpu:cpu time spent executingexeela:elapsed time executingexedsk:number of disk reads during executeexeqry:number of buffers for consistent read during executeexecu:number of buffers for current read during executeexerow:number of rows processed during executeexemis:number of library cache misses during executefchcnt:number of times fetch was calledfchcpu:cpu time spent fetchingfchela:elapsed time fetchingfchdsk:number of disk reads during fetchfchqry:number of buffers for consistent read during fetchfchcu:number of buffers for current read during fetchfchrow:number of rows fetcheduserid:userid of user that parsed the cursor 可根据自己的需要设置排序 举例: 1.列出前2条sql语句的执行情况: C:\tkprof c:\oc_ora_2892.trc c:\cc.txt print=2 2.将数据保存到数据库: C:\tkprof c:\oc_ora_2892.trc c:\cc.txt insert=c:\insert.sql 执行后会在c:\产生insert.sql文件,执行该文件即可将数据保存到数据库,以下为insert.sql部分内容: REM Edit and/or remove the following CREATE TABLEREM statement as your needs dictate.CREATE TABLE tkprof_table(date_of_insert DATE,cursor_num NUMBER,depth NUMBER,user_id NUMBER,parse_cnt NUMBER,parse_cpu NUMBER,parse_elap NUMBER,parse_disk N
您可能关注的文档
- 第一课:SYBASE基本知识(安装、配置).ppt
- 2.5 SQL Server 2005的常用工具.ppt
- 1、SQL Server 2005概述与安装.pptx
- 第7章 SQL Server 2005数据库管理系统.ppt
- Spotlight_On_Oracle使用与分析.ppt
- 25.2用列举法求概率(1直接列举法_列表法).ppt
- 2011最新10月CCNA题库word版501~518题.doc
- 北京四中2015~2016学年度第一学期期中考试初二年级数学试题.docx
- SQL Server 2005数据库原理及应用教程第6章 SQL SERVER 2005关系数据库系统.ppt
- SQL基本操作案例.doc
- 老高考旧教材适用2025版高考物理二轮复习专题3电场与磁持层突破练7电场带电粒子在电场中的运动.doc
- 2025版新教材高中数学同步练习41总体集中趋势的估计新人教A版必修第二册.doc
- 2024年高中历史第四单元明清中国版图的奠定与面临的挑战能力提升部编版必修中外历史纲要上.doc
- 2024年宝宝食用油项目立项申请报告模范.docx
- 2024年光源系列项目规划申请报告模板.docx
- 2024年便携照明设备项目立项申请报告范稿.docx
- 2024年纳迪克酸酐项目规划申请报告范本.docx
- 2024年金属制卫生、烹饪、餐饮器具项目立项申请报告.docx
- 2024年导电涂料项目提案报告范样.docx
- 2024年其他未列明电子设备项目申请报告范样.docx
最近下载
- 救护队预防性检查.ppt
- 新型轻钢装配式复合墙板.pdf VIP
- 2023-2024学年陕西省西安市雁塔区数学三年级第一学期期末考试试题含答案.doc
- 酚醛树脂1.ppt
- 2022-2023年度武汉规划展示馆与两型社会展示馆定稿.pdf VIP
- 煤矿地质学培训教材.pdf
- BS ISO 4864-2023 Ships and marine technology. Jacking system appliances on self-elevating 船舶和船舶技术. 自升式顶升系统设备.pdf
- 【提分专项】闽教版英语小升初总复习-语法部分(B卷有答案).docx VIP
- 空压机工作原理及技术方案.docx
- 人教版(2023版)初中历史八年级上册全册同步练习+单元及期中期末测试合集(含答案)【可编辑可打印】.docx
文档评论(0)