Query has different performance in different databases
qwe24619Oct 18 2006 — edited Oct 19 2006Hello,
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