CURSOR_SHARING=SIMILAR
CURSOR_SHARING=SIMILAR
With CURSOR_SHARING=SIMILAR whenever the optimizer looks at a replaced bind value to make a decision then that bind is checked to see if it should be considered unsafe. The check made is :
Is the operator NEITHER of ‘=’ or ‘!=’
OR
Are there Column Histograms present on the column.
If either of these are true then the bind is deemed to be unsafe and a new cursor will be created (So binds used in non equality predicates (eg >, =, <=, LIKE) are unsafe). To check for whether a bind is considered unsafe see
SQL> select count(*) from dba_objects where object_id>3;
COUNT(*)
----------
50363
SQL> select count(*) from dba_objects where object_id>5;
COUNT(*)
----------
50361
SQL> select count(*) from dba_objects where object_id>6;
COUNT(*)
----------
50360
SQL> select count(*) from dba_objects where object_id>4;
COUNT(*)
----------
50362
SQL> select sql_id,child_number from v$sql where sql_text like '%dba_objects%';
SQL_ID CHILD_NUMBER
------------- ------------
bg5mpjkmsjg7h 0
bg5mpjkmsjg7h 1
bg5mpjkmsjg7h 2
bg5mpjkmsjg7h 3
bg5mpjkmsjg7h 4
bg5mpjkmsjg7h 5
bg5mpjkmsjg7h 6
bg5mpjkmsjg7h 7
2r3tjryp06xfx 0:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22034023/viewspace-710434/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Leetcode】800. Similar RGB ColorLeetCodeMILA
- AtCoder Beginner Contest 282 G - Similar PermutationMILA
- LeetCode之Leaf-Similar Trees(Kotlin)LeetCodeMILAKotlin
- [20180803]cursor_sharing = force.txt
- ORACLE中Cursor_sharing引數詳解Oracle
- [20210627]cursor_sharing=force與orade by.txt
- [LeetCode] 1750. Minimum Length of String After Deleting Similar EndsLeetCodeMILA
- [20241012]cursor_sharing=force與函式索引.txt函式索引
- 初始化引數遊標之cursor_sharing
- Leetcode PHP題解--D45 D45 872. Leaf-Similar TreesLeetCodePHPMILA
- cursor_sharing=force強制繫結變數不會把變數值預設當成varchar2型別的理解變數型別