Phone (800) 766-1884 for immediate Oracle support & training
Free Oracle Tips

Home Home
Oracle Monitoring
Growth Monitoring
Emergency DBA Support
Installs & Upgrades
Oracle Migration
Oracle Support Plan
Oracle SQL Tuning
Oracle Performance Tuning

 Our Remote DBA Clients

 

Free Oracle Tips


 
HTML Text

Free Oracle App Server Tips


 
HTML Text

Donald K. Burleson

Oracle Tips

Secrets of cross-database SQL joins

When doing cross-database joins, Oracle will always assume that the schema has been invalidated since the last execution of the SQL statement, and re-parse the SQL statement every time that the statement is executed. 

This will cause huge overhead whenever your database is doing a high-volume of distributed database joins.

For example, the following query will be re-parsed every time that it is executed:

Select

   Customer_name, order_number

From

   Customer,

   order@new_york

Where

   Customer_number = :hostvar;

Oracle re-parses the above query because the leftover SQL is marked as invalid in the SQL cache as soon as the query has completed.  According to Oracle, this is a safety mechanism to ensure that the schema has not changed since the last execution.  Hence, the only solution to this problem is the use of remote procedure calls to replace the SQL statement.  In cases where a distributed join is unavoidable, frequent flushing of the shared pool may be appropriate.

If you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The Definitive Reference” by Rampant TechPress.  It’s only $41.95(I don’t think it is right to charge a fortune for books!) and you can buy it right now at this link:

http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

 

 

Burleson Oracle consulting & training



 

 

WISE Oracle monitoring software
 

 

Oracle forum for DBA 

 

Rampant TechPress Oracle book publisher

image 

  

 
E-mail us for BC Oracle support:   

Copyright © 1996 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.