Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query has different performance in different databases

qwe24619Oct 18 2006 — edited Oct 19 2006
Hello,

I try to optimize my queries and I´ve got problems with subqueries:

Statement 1:

Select T1.*
From SYS_Referenz T1
Where T1.Eltern_ID In (Select '0000000000000073' From Dual)

Statement 2:

Select T1.*
From SYS_Referenz T1
Where T1.Eltern_ID In ('0000000000000073')


Statement 2 is always fast, Statement 1 is only fast in one database. In another database it is very slowly. The databases exist on the same server and have identical SYS_Referenz tables (columns, indexes and rows).

I use this queries in PL/SQL functions where I use collections of objects as subquery, therefore I have to use the syntax from statement 1.
What can be the reason for the different performances in the databases?
Thanks

Andreas
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 16 2006
Added on Oct 18 2006
11 comments
786 views