SQL> select * from v$sysstat a where a.STATISTIC#=339;
STATISTIC# NAME CLASS VALUE STAT_ID
---------- ---------------------------------------------------------------- ---------- ---------- ----------
339 parse count (hard) 64 12614 143509059
SQL> select namespace,gets,pins,reloads,INVALIDATIONS from v$librarycache;
NAMESPACE GETS PINS RELOADS INVALIDATIONS
-------------------- ---------- ---------- ---------- -------------
SQL AREA 953706920 953785272 8674 943
TABLE/PROCEDURE 17373 145986 2048 0
BODY 178 2072 29 0
TRIGGER 302 436 85 0
INDEX 208 472 5 0
CLUSTER 715 2419 5 0
OBJECT 0 0 0 0
PIPE 0 0 0 0
JAVA SOURCE 0 0 0 0
JAVA RESOURCE 0 0 0 0
JAVA DATA 0 0 0 0
11 rows selected.
多次执行:
select * from a1;
稳定在
SQL> /
STATISTIC# NAME CLASS VALUE STAT_ID
---------- ---------------------------------------------------------------- ---------- ---------- ----------
339 parse count (hard) 64 12661 143509059
SQL> /
NAMESPACE GETS PINS RELOADS INVALIDATIONS
--------------- ---------- ---------- ---------- -------------
SQL AREA 953707073 953786218 8680 944
TABLE/PROCEDURE 17465 146209 2060 0
BODY 180 2076 29 0
TRIGGER 307 441 85 0
INDEX 208 472 5 0
CLUSTER 725 2440 5 0
OBJECT 0 0 0 0
PIPE 0 0 0 0
JAVA SOURCE 0 0 0 0
JAVA RESOURCE 0 0 0 0
JAVA DATA 0 0 0 0
11 rows selected.
进行ddl测试;
alter table a1 modify name char(200);
此时硬解析前后对比:
SQL> /
STATISTIC# NAME CLASS VALUE STAT_ID
---------- ---------------------------------------------------------------- ---------- ---------- ----------
339 parse count (hard) 64 12709 143509059
SQL> /
STATISTIC# NAME CLASS VALUE STAT_ID
---------- ---------------------------------------------------------------- ---------- ---------- ----------
339 parse count (hard) 64 12713 143509059
INVALIDTION前后对比:
SQL> /
NAMESPACE GETS PINS RELOADS INVALIDATIONS
--------------- ---------- ---------- ---------- -------------
SQL AREA 953707179 953787022 8686 950
TABLE/PROCEDURE 17526 146463 2081 0
BODY 180 2088 29 0
TRIGGER 311 445 85 0
INDEX 208 472 5 0
CLUSTER 731 2463 5 0
OBJECT 0 0 0 0
PIPE 0 0 0 0
JAVA SOURCE 0 0 0 0
JAVA RESOURCE 0 0 0 0
JAVA DATA 0 0 0 0
11 rows selected.
SQL> /
NAMESPACE GETS PINS RELOADS INVALIDATIONS
--------------- ---------- ---------- ---------- -------------
SQL AREA 953707215 953787112 8688 953
TABLE/PROCEDURE 17528 146525 2082 0
BODY 180 2092 29 0
TRIGGER 315 449 85 0
INDEX 208 472 5 0
CLUSTER 731 2463 5 0
OBJECT 0 0 0 0
PIPE 0 0 0 0
JAVA SOURCE 0 0 0 0
JAVA RESOURCE 0 0 0 0
JAVA DATA 0 0 0 0
11 rows selected.