关于cursor_sharing=similar

来源:互联网 发布:知乎 如何自学建筑设计 编辑:程序博客网 时间:2024/05/17 01:56
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

本文作者:biti_rainy(biti_rainy@itpub.net)

 

摘要:本文通过简单实验来尝试说明cursor_sharing=similar的含义。
1.1.       实验现象
我们先看看在表没有分析无统计数据情况下的表现 

SQL>altersessionsetcursor_sharing=similar;

 

Sessionaltered.

 

SQL>selectname,valuefromv$sysstatwherenamelike'%parse%';

 

NAME                                                                 VALUE

--------------------------------------------------------------------------

parsetimecpu                                                        4948

parsetimeelapsed                                                   4468

parsecount(total)                                                  170148

parsecount(hard)                                                   1619 (硬分析次数)

parsecount(failures)                                               80

 

SQL>selectcount(*)fromtwhereobject_id=1000;

 

  COUNT(*)

----------

         0

 

SQL>selectname,valuefromv$sysstatwherenamelike'%parse%';

 

NAME                                                                 VALUE1<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击