DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Optimizer

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Posts
    77

    Optimizer

    How can I change the optimizer_mode with in a PL/SQL procedure?

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    It's untested, but this might work ...
    Code:
    begin
       execute immediate 'alter session set optimizer_mode=''first_rows''';
    end;
    /
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Feb 2004
    Posts
    77
    slimdave, execute immediate worked nicely.

    I was wondering if there was any oracle supplied package to do the same.

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    nope, not as far as i know, but you could always create your own procedure.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width