Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Aleph

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. Slow sql processing in Oracle Prod (vs Test)

    Slow sql processing in Oracle Prod (vs Test)

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    We are concerned about a serious difference in sql processing between test and prod environments.

    For example, the query below takes about 6 seconds in test, and 150 seconds in prod (30 times longer), for the same result. About the same on other days.

    SELECT ABC01.Z13.Z13_REC_KEY||'ABC01' FROM ABC01.Z13,ABC60.Z13,ABC60.Z103
    WHERE substr(Z103_REC_KEY,6,9)=ABC60.Z13.Z13_REC_KEY
    AND substr(Z103_REC_KEY_1,6,9)=ABC01.Z13.Z13_REC_KEY
    AND substr(Z103_REC_KEY_1,1,5)='ABC01'
    AND ABC60.Z13.Z13_OPEN_DATE = '20120220';

    What could cause the difference? Do you have ideas of what could be done to optimize oracle on production ?

    Resolution:
    Following the principles described in KB 16384-25265, I executed the following query on Production:

    SELECT /*+ DYNAMIC_SAMPLING(2) ALL_ROWS */ABC01.Z13.Z13_REC_KEY||'ABC01' FROM ABC01.Z13,ABC60.Z13,ABC60.Z103
    WHERE substr(Z103_REC_KEY,6,9)=ABC60.Z13.Z13_REC_KEY
    AND substr(Z103_REC_KEY_1,6,9)=ABC01.Z13.Z13_REC_KEY
    AND substr(Z103_REC_KEY_1,1,5)='ABC01'
    AND ABC60.Z13.Z13_OPEN_DATE = '20120220';

    It took about 10 seconds.

    We suggest that you add the DYNAMIC SAMPLING hint to all of *your own* SQL queries -- especially those involving the z103.


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Slow response time accessing item records in GUI
      • Slow system response during check-out (loan)
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 20
      2. contype:kba
      3. Prod:Aleph
      4. Type:General
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved