最初由 biti_rainy 发布
[B]http://blog.csdn.net/biti_rainy/ ... cle_20040712_3.aspx [/B]
看完了你的文章,有几点问题请教:
1。如前面我所提的,既然SIMILAR优点那么多,那就更应该设为默认选项才是。不知ORACLE为何不把它设为默认。
2。我把一个表解析过后,再执行查看硬解析后,使用相似查询,硬解析依旧。cursor_sharing = similar;已经设置
如下:
analyze table area_def compute statistics for table for columns area_code
select name,value from v$sysstat where name like '%parse%';
parse time cpu
55918
parse time elapsed
28359
parse count (total)
6165158
parse count (hard)
14349
parse count (failures)
358
select count(rowid) from area_def t where area_code = '025';
parse time cpu
55919
parse time elapsed
28360
parse count (total)
6165192
parse count (hard)
14351
parse count (failures)
358
select count(rowid) from area_def t where area_code = '0512';
parse time cpu
55921
parse time elapsed
28360
parse count (total)
6165268
parse count (hard)
14351
parse count (failures)
358
硬解析没变。
select sql_text,child_number from v$sql where sql_text like 'select count(rowid) from area_def t where%';
select count(rowid) from area_def t where area_code = :"SYS_B_0"
0
你在文章结尾时说:“存在object_id的 histograms ,则每次是不同的值 的时候都产生硬解析 ,若不存在 histograms ,则不产生硬解析 。”这个 histograms 不知是什么意思,望指教。我的这个表分析过了,怎么没有histograms ?