Hi,
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
how can I check if cursor sharing is happening? I have created following example to test this..
CREATE TABLE t_sh_cur_tst (x NUMBER, y NUMBER);
select count(y) from t_sh_cur_tst where x = 1;
select count(y) from t_sh_cur_tst where x = 10;
select count(y) from t_sh_cur_tst where x = 20;
select count(y) from t_sh_cur_tst where x = 30;
select count(y) from t_sh_cur_tst where x = 40;
select count(y) from t_sh_cur_tst where x = 50;
select count(y) from t_sh_cur_tst where x = 60;
select count(y) from t_sh_cur_tst where x = 70;
select count(y) from t_sh_cur_tst where x = 80;
select count(y) from t_sh_cur_tst where x = 99;
When I check these I got all similar value for SHARABLE_MEM, PERSISTENT_MEM, RUNTIME_MEM .. but all rows have same PARSE_CALLS ..
select address,a.* from gv$sql a where upper(sql_text) LIKE upper('%t_msh_cur_tst%');
following are DB parameter values ..
NAME TYPE VALUE
-------------------------------------- ------- ------
_optimizer_adaptive_cursor_sharing boolean TRUE
_optimizer_extended_cursor_sharing string UDO
_optimizer_extended_cursor_sharing_rel string SIMPLE
cursor_sharing string EXACT
Regards
Hesh