1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

improve sql statement - decrease executing time

Discussion in 'SQL PL/SQL' started by ecivgamer, Nov 29, 2011.

  1. ecivgamer

    ecivgamer Active Member

    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    130
    Hi all,

    As database grows day by day, my need is to improve sql plan in order to decrease executing time.

    Please find my code below, it executes about 96 msecs,
    but when it works on real data (65000 contragentid)
    it executes too long...
    Could you please show me how do I improve sql statement?

    I've got values for each workday of month in table. Chief said we don't load values of dayoff because of space and time economy. Dayoff value is copy of last workday. The purpose of sql statement is to count averages (including days off), actually it's weighted average.

    Please find my session resource profile out file attached, hope it helps.



    Please, be so kind, help me improve performance.
     

    Attached Files:

  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,351
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Define 'executes too long'.
     
  3. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    Please provide us the test sample data , your query , Your output and ten expected output.