Forum Stats

  • 3,875,475 Users
  • 2,266,926 Discussions


Why I cannot use in v$sql for sqlid?

3018678 Member Posts: 274
edited Aug 24, 2015 7:12PM in Oracle Call Interface (OCI)

I collect sql_ids for some queries and insert into a table. However, when I try to get these sql_text's from v$sqlarea it is running very long time. Does anyone know why?

For example, lets consider the following query. Normally, the sub sqlect query should be like select sql_id form my_table. And suppose this table has 40 unique sql_id.

select * from v$sqltext 
where sql_id in (select sql_id from v$sqlarea);

Thanks in advance.


This discussion has been closed.