Cursor Sharing
Rukshan Soza, May 10, 2002 - 8:03 am UTC
Tom,
Is there something similar in v805 ?.
Rgds
Rukshan
May 10, 2002 - 4:21 pm UTC
No, it is a new 8i feature.
Cursor_sharing=force & Query Output Releated Issues
Logan Palanisamy, January 20, 2003 - 3:04 pm UTC
Tom,
Thanks for all your invaluable and dedicated service.
This is with reference to page 448 of Expert One on One book. I was expecting the column length of the second query to 30 after cursor_sharing=force. But it is still coming out as 2. What could be the problem.
Connected to:
Oracle8i Enterprise Edition Release 8.1.6.3.0 - Production
With the Partitioning option
JServer Release 8.1.6.3.0 - Production
SQL> set echo on
SQL> @p448.sql
SQL> select substr(object_name, 1, 2) from dba_objects where rownum = 1;
SU
--
/1
SQL> alter session set cursor_sharing = force;
Session altered.
SQL> select substr(object_name, 1, 2) from dba_objects where rownum = 1;
SU
--
/1
SQL> exit
Disconnected from Oracle8i Enterprise Edition Release 8.1.6.3.0 - Production
With the Partitioning option
JServer Release 8.1.6.3.0 - Production
January 20, 2003 - 3:35 pm UTC
just an artifact -- it was already parsed. try this:
select substr(object_name, 1, 2) from dba_objects A where rownum = 1;
alter session set cursor_sharing=force;
select substr(object_name, 1, 2) from dba_objects B where rownum = 1;
Works indeed
Logan Palanisamy, January 20, 2003 - 5:38 pm UTC
SQL> select substr(object_name, 1, 2) from dba_objects A where rownum = 1;
SU
--
/1
SQL> alter session set cursor_sharing=force;
Session altered.
SQL> select substr(object_name, 1, 2) from dba_objects B where rownum = 1;
/
SUBSTR(OBJECT_NAME,1,2)
--------------------------------------------------------------------------------
/1
SQL> SQL>
SUBSTR(OBJECT_NAME,1,2)
--------------------------------------------------------------------------------
/1
SQL>
Thanks
Cursor sharing for table and column aliases
Loïc, February 28, 2007 - 7:27 am UTC
Hi Tom,
I am currently facing a problem related to the use of the Hibernate ORM; my issue is detailed here:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2448 My questions are:
1/ Is there a way to share cursors having only column and/or table aliases differences?
(whatever the version of Oracle)
2/ If such a feature doesn't exist (yet?) can you think of pros and/or cons about this?
Thanks a lot in advance
February 28, 2007 - 3:41 pm UTC
1) no, they are absolutely different queries.
2) it is not feasible really.
select a X, b Y from t;
select a Y, b X from t;
you would want us to try to rewrite that 2nd query (well the first as well since we don't know if something is there already)
think of the multitude of combinations that would result.