Home > Database > Mysql Tutorial > script:获取某张表上所有的DML操作

script:获取某张表上所有的DML操作

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:28:49
Original
1079 people have browsed it

script:获取某张表上所有的DML操作本脚本from 老白的书 1 select /* ordered use_hash(d) use_hash(c) */ 2 c.kglnahsh hash_value, 3 sum(c.kglobt13) disk_reads, 4 sum(c.kglobt14) logical_reads, 5 sum(c.kglhdexc) executions, 6 c.kglnaobj sql_text

script:获取某张表上所有的DML操作 本脚本from 老白的书


1 select /*+ ordered use_hash(d) use_hash(c) */
2 c.kglnahsh hash_value,
3 sum(c.kglobt13) disk_reads,
4 sum(c.kglobt14) logical_reads,
5 sum(c.kglhdexc) executions,
6 c.kglnaobj sql_text
7 from
8 sys.x$kglob o,
9 sys.x$kgldp d,
10 sys.x$kglcursor c
11 where
12 o.inst_id = userenv('Instance') and
13 d.inst_id = userenv('Instance') and
14 c.inst_id = userenv('Instance') and
15 o.kglnaown = upper('hr') and
16 o.kglnaobj = upper('regions') and
17 d.kglrfhdl = o.kglhdadr and
18 c.kglhdadr = d.kglhdadr
19 group by
20 c.kglnaobj,c.kglnahsh
21* order by 3

HASH_VALUE DISK_READS LOGICAL_READS EXECUTIONS SQL_TEXT
---------- ---------- ------------- ---------- ----------------------------------------------------------
2859910006 0 20 1 select * from regions for update
485381962 5 30 1 delete regions where region_id=1
4202984667 11 66 1 select * from regions
1257077165 7 76 1 insert into regions select * from regions

Related labels:
Statement of this Website
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
Latest Issues
Ajax submit script submission error
From 1970-01-01 08:00:00
0
0
0
How to use the created hook in the setup script
From 1970-01-01 08:00:00
0
0
0
javascript - script tag async attribute
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template