• DDL引发的对象invalidation


    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.
    

  • 相关阅读:
    java字符串类型——String
    Arrays.asList(String[]).add(String) 报错
    Bigdecimal除法异常
    java使用AES-256-ECB(PKCS7Padding)解密——微信支付退款通知接口指定解密方式
    centos安装rocketMQ
    拦截器中获取不到controller注解问题
    springboot接收date类型参数
    mybatis
    mybatis generator对于同一个表生成多次代码的问题
    抓包工具之MitmProxy
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13352230.html
Copyright © 2020-2023  润新知