File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Different Execution Plans for 2 instances of the same database.. Why??.. Help me out Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Different Execution Plans for 2 instances of the same database.. Why??.. Help me out" Watch "Different Execution Plans for 2 instances of the same database.. Why??.. Help me out" New topic
Author

Different Execution Plans for 2 instances of the same database.. Why??.. Help me out

Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200
Hello all,
I have a problem with Execution Plan
Here I have a SQL query, which I am running on 2 databases. The 2 databases are same snapshots but at different locations. The local database
( database which is on local server ) is giving different SQL Execution planand the remote database is giving different execution plan.
All the init.ora parameters are same. Both the databases have same tables and same number of records every thing is same. Even then, why it is giving different Execution plans.
The only major difference it showing is, at local database, at one point/level the execution plan is using the "HASH JOIN", whereas in remote database at the same point/level, the execution plan it is using "NESTED LOOPS". Why it so ?
Please Help me out.
Regards,
Saj
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
table has not been analysed i guess?
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
different indexes
instances were analyzed at different times (or one not at all)
different Oracle versions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Different Execution Plans for 2 instances of the same database.. Why??.. Help me out
 
Similar Threads
Remote/local database design. Please comment this.
Prepared statement - static variable
Local Mode Considerations
Preparing a PreparedStatement
Order of SQL WHERE clause conditions & database table with index