Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

   

Oracle Business Intelligence, OLAP and BI training and consulting tips . . .

Click here for more
Oracle News Headlines

 


Mark Rittman

Oracle Direct Path Data Load and Ordered Insertions

Standard Oracle relational theory tells you that, when putting data into a table, it doesn't matter in which order you insert the data, as Oracle doesn't guarantee the order in which it's returned, unless you specifically use an ORDER BY clause. Therefore, you can't rely on data coming back out from a table in the same order it was entered in.

However, when working with data warehouse fact tables, there can be benefits in specifying how Oracle physically stores the row data within the database, so that rows that relate to a particular time span are found within the same database block, reducing disk I/O and speeding up queries.

The INSERT /*+ APPEND */ feature of Oracle allows you to use the direct path method of loading tables, storing new data after existing data in the table and optionally allowing you to specify NOLOGGING to bypass the writing of undo and redo entries. If you couple this with an ORDER BY statement in the accompanying SELECT clause, you can make Oracle store new table rows in blocks in the order in which you want to retrieve them. For example;

INSERT /*+ APPEND */
     INTO sales_fact
          SELECT * 
          FROM customer_sales_fact_staging
          ORDER BY time_wh_id;
COMMIT;

would insert rows into the sales_fact table, using the direct path method, and the rows would be placed in blocks in the order of the time warehouse key. This would be particularly useful if common queries to the sales_fact table returned rows around the same date range, as Oracle would be able to return many fact table rows from each block retrieved, rather than one or two per block.

If you're looking to populate a table from fresh (either a new table, or one that's been truncated) inserting rows in a particular order could also benefit index creation, as you could specify NOSORT and save many hours of index creation on large tables.

Many thanks to John W Spencer, Justin Cave and Chris Slattery for contributing to the OTN Thread that pointed out this useful tip.


 

 

   
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational