Free Newsletters:
Database Journal  
DBAnews  

DBASupport

 The Knowledge Center for Oracle Professionals

Search DBAsupport:
 
HOME 11g Central 10g Central 9i Central 8i Central Oracle News Scripts FAQ OCP Zone Resources Technical Docs Tools & Utilities Forums
internet.com

» HOME
» FEATURES
    11g Central
    10g Central
    9i Central
    8i Central
    Oracle News
» COMMUNITY
    Scripts
    Forums
    FAQ
    OCP Zone
» RESOURCES
    Resources
    Technical Docs
    Tools & Utilities
    Tech Jobs

Marketplace Partners
Become a Marketplace Partner


internet.commerce
Be a Commerce Partner












internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


   DBAsupport.com > Oracle > Oracle 9i Central > Featured Stories




UNIX Administrator - Linux/Solaris (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Oracle Optimizer: Moving to and working with CBO - Part 7
Amar Kumar Padhi, amar_padhi@hotmail.com


In the final installment of this series, we will cover the basics of using Stored Outlines and Oracle Application specific information.

14. Stored Outlines

Oracle provides the option of changing the execution plan for running queries, without changing the code itself. This feature also allows us to insulate our application execution plans against any structural changes or upgrades. This feature is known as Stored Outlines and the idea is to store the execution plan in Oracle provided tables, which will later be referred to by the optimizer to execute the queries, thus providing optimizer plan stability.

Stored outlines are global and apply to all identical statements, regardless of the user firing it.

Setup for Stored Outlines

The user OUTLN is created automatically during installation. This user should be locked or password protected by the DBA.

The following System or session specific parameters are provided for creating and using stored outlines. These are not initialization parameters and are not set in the Initialization file.

CREATE_STORED_OUTLINES

Setting this to TRUE or an appropriate category name will automatically enable creating and storing of outlines for every subsequent query fired. A DEFAULT category is used unless specified.

e.g.:
SQL> alter session set create_stored_outlines=true;

SQL> alter session set create_stored_outlines=AM_OLTP;

SQL> alter system set create_stored_outlines = AM_OLTP;

SQL> alter system set create_stored_outlines = false;

USE_STORED_OUTLINES

This parameter enables the use of public stored outlines. Setting USE_STORED_OUTLINES to TRUE causes the execution plan stored in the DEFAULT category to take effect. Set the parameter to a proper category name to explicitly use a different category.

e.g.:
SQL> alter session set use_stored_outlines=true;

SQL> alter session set use_stored_outlines=AM_OLTP;

SQL> alter system set use_stored_outlines = AM_OLTP;

SQL> alter system set use_stored_outlines = false;

This option is also provided to test and use private outlines (CREATE PRIVATE OUTLINE, USE_PRIVATE_OUTLINES)

The outlines present in the session's private area are used rather than the publicly stored outlines.

Optionally, stored outlines can be created for individual statements with the CREATE OUTLINE command. This has to be used with care, as the SQL statement provided should be identical to what is present in the application.

e.g.:
SQL> variable b1 number;

SQL> create or replace outline run25 on
  2  select transaction_date, creation_date from mtl_material_transactions
  3  where transaction_id = :b1;

The package DBMS_OUTLN is used for managing stored outlines. This is synonymous with the OUTLN_PKG package.

The following are some of the important procedures provided for maintenance.

UPDATE_BY_CAT: Changes all outlines from one category to another.

e.g.: moving all DEFAULT category outlines to AM_OLTP category.
SQL> exec outln_pkg.update_by_cat('DEFAULT', 'AM_OLTP');

DROP_UNUSED: Drops outlines that have never been used.

SQL> exec outln_pkg.drop_unused;

DROP_BY_CAT: Drops all outlines in the specified category.

SQL> exec outln_pkg.drop_by_cat('AM_OLTP');

Previous   Next


Back to DBAsupport.com





internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES