# v$sql_cs_statistics bug in 12c? I think I’ve run across a bug in 12c where v$sql_cs_statistics is not populated in 12c as it was in 11.2.0.3.

I’ve messed with adaptive cursor sharing using an example on Tim Hall’s web site: web example

I’ve tried to break it and change it in various ways to understand adaptive cursor sharing.  I was using some 11g databases and on those systems the example results in output from v$sql_cs_statistics. But in 12c the view returns nothing. Maybe this is normal but it seems bug like to me. Here is a zip of my version of Tim’s example and it’s output on an 11.2.0.3 and 12.1 database: zip In the working 11.2.0.3 example you have this output from v$sql_cs_statistics:

ORCL::SYSTEM>SELECT * FROM v$sql_cs_statistics WHERE sql_id = '9bmm6cmwa8saf'; ADDRESS HASH_VALUE SQL_ID CHILD_NUMBER BIND_SET_HASH_VALUE P EXECUTIONS ROWS_PROCESSED BUFFER_GETS CPU_TIME ---------------- ---------- ------------- ------------ ------------------- - ---------- -------------- ----------- ---------- 0000000089035390 4171522382 9bmm6cmwa8saf 1 2064090006 Y 1 50001 501 0 0000000089035390 4171522382 9bmm6cmwa8saf 0 2342552567 Y 1 3 3 0 On 12c you get nothing: ORCL:CDB$ROOT:SYSTEM>SELECT * FROM v$sql_cs_statistics WHERE sql_id = '9bmm6cmwa8saf'; no rows selected The other queries in the example all return results so I guess it is a bug. – Bobby ## About Bobby I live in Chandler, Arizona with my wife and three daughters. I work for US Foods, the second largest food distribution company in the United States. I've been working as an Oracle database administrator and PeopleSoft administrator since 1994. I'm very interested in Oracle performance tuning. This entry was posted in Uncategorized. Bookmark the permalink. ### 2 Responses to v$sql_cs_statistics bug in 12c?

1. Anonymous says:

it’s not a bug, change the behavior for some performance purpose.

• Bobby says: