How to improve the performance of the attached query, Please help

Hi,
How to improve performance of the below query, Please help. also attached explain plan -
SELECT Camp.Id,
rCam.AccountKey,
Camp.Id,
CamBilling.Cpm,
CamBilling.Cpc,
CamBilling.FlatRate,
Camp.CampaignKey,
Camp.AccountKey,
CamBilling.billoncontractedamount,
(SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
rCam.AccountKey as AccountKey
FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
WHERE Camp.AccountKey = rCam.AccountKey
AND Camp.AvCampaignKey = rCam.AvCampaignKey
AND Camp.AccountKey = CamBilling.AccountKey
AND Camp.CampaignKey = CamBilling.CampaignKey
AND rCam.AccountKey = xSite.AccountKey
AND rCam.AvSiteKey = xSite.AvSiteKey
AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
to_date('01-01-2011', 'DD-MM-YYYY')
GROUP By rCam.AccountKey,
Camp.Id,
CamBilling.Cpm,
CamBilling.Cpc,
CamBilling.FlatRate,
Camp.CampaignKey,
Camp.AccountKey,
CamBilling.billoncontractedamount
Explain Plan :-
Description                    Object_owner          Object_name     Cost     Cardinality     Bytes     
SELECT STATEMENT, GOAL = ALL_ROWS                              14     1     13
SORT AGGREGATE                                                  1     13
VIEW                         GEMINI_REPORTING               14     1     13
HASH GROUP BY                                        14     1     103
NESTED LOOPS                                        13     1     103
HASH JOIN                                             12     1     85
TABLE ACCESS BY INDEX ROWID     GEMINI_REPORTING     RCAMSIT          2     4     100
NESTED LOOPS                                        9     5     325
HASH JOIN                                        7     1     40
SORT UNIQUE                                        2     1     18
TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          SITE          2     1     18
INDEX RANGE SCAN          GEMINI_PRIMARY          SITE_I0          1     1     
TABLE ACCESS FULL          GEMINI_PRIMARY          SITE          3     27     594
INDEX RANGE SCAN          GEMINI_REPORTING     RCAMSIT_I     1     1     5     
TABLE ACCESS FULL     GEMINI_PRIMARY     CAMPAIGN                    3     127     2540
TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          CAMBILLING     1     1     18
INDEX UNIQUE SCAN     GEMINI_PRIMARY     CAMBILLING_U1                    0     1

Hello,
This has really nothing to do with the Oracle Forms product.
Please, send the SQL or/and PL/SQL questions in the corresponding forums.
Francois

Similar Messages

  • How to track the Modified Data-Please help

    Hi Gurus,
    Background about the issue.... We have Customers and Customer Tier on Siebel On Demand. Every month after bookings are done customer tier is modified depending on the reveune genrated by the customer. Say for example ....Customer XXX was under 'A' but due to bad bookings for the month now they are degraded 'B'. Like this we get a list of customer tiers for the month of all customers and are uploaded in to Siebel.
    Now the challenge for me is while reporting in Analytics... how to retain the previous value. For example...For Customer xxx the customer tier was A in Aug and is modified as B in September. I want retain the previous value in my reports....
    In one of the Siebel Query documents i saw that PRE <'Field Refrence'> syntax holds the previous value of the field ..But it did not work in my case...
    Any suggestions to retain the old value after doing modifications..
    Thanks for the help.
    BK

    BK,
    My suggestion would be to write workflows that capture the data when it changes into the task description e.g.
    PRE(CustomerTier) <> (CustomerTier) creates a task that puts (Customer Tier into the description)
    then using the Task created date reflect that in the activity report.
    cheers
    Alex

  • BI BEANS - Graph - How to change the color .. please help

    Hi Everyone,
    Can anyone please tell me how to change the color of the Graph bars or slices. I mean the color which represents the data.
    For example in a pie chart I want to set specific color for specific slice. Please help.
    Regards
    SRT

    It seems to be the SET_SERIE_COLOR() method added to the FormsGraph revised version, but this latest version is momentarily not available for download.
    I think there is an existant open thread on this. Maybe you could find it using the Forum Search box.
    Francois

  • I am hacked on all my apple devices. How to solve the issue? Please help!

    Hi everyone,
    So whenever I open certain websites on Safari, suddenly I am redirected to either a women's health or a doctor's ad. (I am guessing this is called phishing)
    1)I've asked my friends if they've had the same problem with those certain sites and they replied no. Does this mean it is about my network? (I am the only one using this network at my home as I live alone)
    2)This happens on all my Apple devices including iPad and iPhone (when I tried to open the same website on my İphone while using mobile data, the problem did not happen- when I opened wifi on my phone it happened. same for iPad as well)
    Admedic said there were no adware, I have never changed my DNS so it has always stayed the way it always was also. So I am guessing my network is the problem.  (I am also guessing that this happened after I tried to watch a movie free online) BUT, this problem does not occur with Google Chrome on the same website. So is this about my network or my safari?
    I am now so scared if this person who hacked me gets all my information. What am I supposed to do? Please help!

    Hi! Thanks for your quick reply.
    A few things happened since I've posted this.
    1)I've deleted all the history and cookies from my macbook safari and when I opened the website with the issue, the problem did not happen this time.
    2)Seeing this, I've deleted my history on iPhone's safari and opened the same website but the problem was there again.
    3)The problem does not happen on iPad.
    So, I do not have the problem at all on Google Chrome but on Safari (now just on iPhone)
    Is this still about my router settings? If so would changing my phone DNS settings would suffice? Or do you think the problem might still remain on my computer as well?
    This is so frustrating for a person who does not know anything about technology at all
    Thank you!

  • I purchased a second hand iPad mini and it's on activation lock because I don't know how to contact the original owner please help me

    Please help me

    You will not be able to activate the iPad without the Apple ID and Password of previous owner.

  • How to play the audio file please help me

    i would like to play audio files such wav files, au files etc
    I would like to know how to play audio file easily in Applet and
    applications
    Thank you

    import sun.audio.*; //import the sun.audio package
    import java.io.*;
    //** add this into your application code as appropriate
    // Open an input stream to the audio file.
    InputStream in = new FileInputStream(Filename);
    // Create an AudioStream object from the input stream.
    AudioStream as = new AudioStream(in);
    // Use the static class member "player" from class AudioPlayer to play
    // clip.
    AudioPlayer.player.start(as);
    // Similarly, to stop the audio.
    AudioPlayer.player.stop(as);

  • How to make the server threadsafe (Please Help)

    Hi to all,
    I have urgent question, and any
    reply will be welcome.
    How i make my server that use rmi threadsafe,
    i want that each request from clients,the
    server will make a separate thread.
    the ejb use jndi to do this, how can i do this in rmi
    i want that a client will get a reference to a factory
    object in the server, the factory object will create a
    thread and will return the reference to the client.
    Thanks,
    dan

    Hi Bill,
    Thanks for your reply.
    at the rmi specification it said that :
    3.2 Thread Usage in Remote Method Invocations
    A method dispatched by the RMI runtime to a remote object implementation may or may not execute in a separate thread. The RMI runtime makes no guarantees with respect to mapping remote object invocations to threads. Since remote method invocation on the same remote object may execute concurrently, a remote object implementation needs to make sure its implementation is thread-safe.
    this is all what sun has to say about using
    threads with rmi.
    do you have any example for using rmi server
    that handle concurrent access?
    again,
    lots of thanks for your help.
    dan

  • When I switched to foxfire the print got very tiny. I am new at this and don't know how to enlarge the print. Please help me.

    How do I enlarge the print?

    See this:
    https://support.mozilla.com/en-US/kb/Page+Zoom
    The Firefox Page Zoom feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox.
    Try the Default FullZoom Level extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

  • I am getting an error report and not sure how to fix the script. Please help... 3

    So now Im getting a new error report. I named the instance of the button in the properties panel btn_ccbil.
    Here is the code I have now:
    import flash.net.URLRequest;
    var url:String = 'http://www.lexiefyfe.com/ccbill9001/index.htm';
    btn_ccbil.addEventListener(MouseEvent.CLICK, onOrderClick);
    function onOrderClick():void
          var request:URLRequest = new URLRequest(url);
          try {
                navigateToURL(request, '_blank');
          } catch (e:Error) {
                trace('An error occurred');
    Here is the error report:
    Scene=photogallery, layer=buttons, frame=1, Line 7 A type identifier is expected after the ':'.
    Scene=photogallery, layer=buttons, frame=1, Line 9 The class or interface 'flash.net.URLRequest' could not be loaded.
    This is the original code for the billing from ccbill I am trying to get to work with flash:
    <A HREF="http://www.lexiefyfe.com/ccbill9001/index.htm"><img src="ccbutton.jpg"></A>
    Is this just something that flash can't do? If so will someone please let me know. I am running in circles at this point and very frustrated... I'm new to as3 but I thought it could work.
    Thank you to all for the help and consideration,
    Thomas

    You appear to be using AS3 code in an AS2 setting.  Go into your Publish Settings and change the actionscript version to AS3 in the Flash section.
    Other matters...
    You do not need to import the URLRequest class while coding in the Flash IDE.
    You need to put an argument in the function definition due to the listeners throwing one when it is triggered...
    function onOrderClick(evt:MouseEvent):void

  • I am getting an error report and not sure how to fix the script. Please help...

    I am using action script 3. I have html codes from ccbill that I am trying to make work with flash. Here is the script I am trying to use:
    import flash.net.URLRequest;
    var url:String = 'http://www.lexiefyfe.com/ccbill9001/index.htm';
    myButton.addEventListener(MouseEvent.CLICK, onOrderClick);
    function onOrderClick():void
          var request:URLRequest = new URLRequest(url);
          try {
                navigateToURL(request, '_blank');
          } catch (e:Error) {
                trace('An error occurred');
    Here is the code from ccbill:
    <A HREF="http://www.lexiefyfe.com/ccbill9001/index.htm"><img src="ccbutton.jpg"></A>
    This is the error report I am getting:
    Scene=photogallery, layer=buttons, frame=1, Line 1 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 3 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 5 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 7 A type identifier is expected after the ':'.
    Scene=photogallery, layer=buttons, frame=1, Line 9 The class or interface 'flash.net.URLRequest' could not be loaded.
    Scene=photogallery, layer=buttons, frame=1, Line 7 Statement must appear within on handler
    If anyone can help me with this issue I would be most grateful.
    Thank you for any consideration,
    Thomas

    You have a mixture of things going on... AS3 code in an AS2 setting.  Those are all AS2 error messages, and they are indicating you have placed the code on the buttons.  To use that code, it must be placed on the timeline, and your Flash Publish Settings need to have AS3 specified instead of AS2.  AS3 does not allow code to be placed on objects like AS2 does.

  • How to improve performance of the attached query

    Hi,
    How to improve performance of the below query, Please help. also attached explain plan -
    SELECT Camp.Id,
    rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount,
    (SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
    rCam.AccountKey as AccountKey
    FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
    WHERE Camp.AccountKey = rCam.AccountKey
    AND Camp.AvCampaignKey = rCam.AvCampaignKey
    AND Camp.AccountKey = CamBilling.AccountKey
    AND Camp.CampaignKey = CamBilling.CampaignKey
    AND rCam.AccountKey = xSite.AccountKey
    AND rCam.AvSiteKey = xSite.AvSiteKey
    AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
    to_date('01-01-2011', 'DD-MM-YYYY')
    GROUP By rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount
    Explain Plan :-
    Description Object_owner Object_name Cost Cardinality Bytes
    SELECT STATEMENT, GOAL = ALL_ROWS 14 1 13
    SORT AGGREGATE 1 13
    VIEW GEMINI_REPORTING 14 1 13
    HASH GROUP BY 14 1 103
    NESTED LOOPS 13 1 103
    HASH JOIN 12 1 85
    TABLE ACCESS BY INDEX ROWID GEMINI_REPORTING RCAMSIT 2 4 100
    NESTED LOOPS 9 5 325
    HASH JOIN 7 1 40
    SORT UNIQUE 2 1 18
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY SITE 2 1 18
    INDEX RANGE SCAN GEMINI_PRIMARY SITE_I0 1 1
    TABLE ACCESS FULL GEMINI_PRIMARY SITE 3 27 594
    INDEX RANGE SCAN GEMINI_REPORTING RCAMSIT_I 1 1 5
    TABLE ACCESS FULL GEMINI_PRIMARY CAMPAIGN 3 127 2540
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY CAMBILLING 1 1 18
    INDEX UNIQUE SCAN GEMINI_PRIMARY CAMBILLING_U1 0 1

    duplicate thread..
    How to improve performance of attached query

  • How to improve the query performance in to report level and designer level

    How to improve the query performance in to report level and designer level......?
    Plz let me know the detail view......

    first its all based on the design of the database, universe and the report.
    at the universe Level, you have to check your Contexts very well to get the optimal performance of the universe and also your joins, keep your joins with key fields, will give you the best performance.
    at the report level, try to make the reports dynamic as much as you can, (Parameters) and so on.
    and when you create a paremeter try to get it match with the key fields in the database.
    good luck
    Amr

  • How to improve the performance of adobe forms

    Hi,
    Please give me some suggestions as to how to improve the performance of adobe form?
    Right now when I' am doing user events it is working fine for first 6 or 7 user events. From the next
    one it is hanging.
    I read about Wizard form design approach, how to use the same here.
    Thanks,
    Aravind

    Hi Otto,
    The form is created using HCM forms and processes. I' am performing user events in the form.
    User events will doa round trip, in which form data will be sent to backend SAP system. Processing will
    happen on the ABAP side and result will appear on the form. First 6 or 7 user events works correctly,
    the result is appearing on the form. Around 8 or 9th one, the wait symbol appears and the form is not
    re-rendered. The form is of size 6 pages. The issue is not coming with form of size 1 page.
    I was reading ways to improve performance during re-rendering given below.
    http://www.adobe.com/devnet/livecycle/articles/DynamicInteractiveFormPerformance.pdf
    It talks about wizard form design approach. But in SFP transaction, I am not seeing any kind of wizard.
    Let me know if you need further details.
    Thanks,
    Aravind

  • How to Improve the performance in Variable Selection Screen.

    Hi,
    In Query Level we have Variable " User entry Defalt Valu". User want select particular value when he press "F4" it's take hours time how to improve the performance in Varaible Selection Screen.
    Thanks in Advance.
    Regards,
    Venkat.

    Dear Venkat.
    You please try the following steps:
    1. Say the InfoObject is 0EMPLOYEE against which you have created the variable, which user is trying to select value against, when they execute the report.
    2. Goto RSA1-> InfoObject tab-> Select InfoObject 0EMPLOYEE.
    3. Selcet the following options:
       Query Execution Filter Val. Selectn  -  'Only Posted Value for Navigation'
       Filter Value Repr. At Query Exec. -      'Selector Box Without Values'
    Please let me know if there is any more issue. Feel free to raise further concern
    Thnx,
    Sukdev K

  • How to improve the performance of one program in one select query

    Hi,
    I am facing performance issue in one program. I have given some part of the code of the program.
    it is taking much time below select query. How to improve the performance.
    Quick response is highly appreciated.
    Program code
    DATA: BEGIN OF t_dels_tvpod OCCURS 100,
    vbeln LIKE tvpod-vbeln,
    posnr LIKE tvpod-posnr,
    lfimg_diff LIKE tvpod-lfimg_diff,
    calcu LIKE tvpod-calcu,
    podmg LIKE tvpod-podmg,
    uecha LIKE lips-uecha,
    pstyv LIKE lips-pstyv,
    xchar LIKE lips-xchar,
    grund LIKE tvpod-grund,
    END OF t_dels_tvpod,
    DATA: l_tabix LIKE sy-tabix,
    lt_dels_tvpod LIKE t_dels_tvpod OCCURS 10 WITH HEADER LINE,
    ls_dels_tvpod LIKE t_dels_tvpod.
    SELECT vbeln INTO TABLE lt_dels_tvpod FROM likp
    FOR ALL ENTRIES IN t_dels_tvpod
    WHERE vbeln = t_dels_tvpod-vbeln
    AND erdat IN s_erdat
    AND bldat IN s_bldat
    AND podat IN s_podat
    AND ernam IN s_ernam
    AND kunnr IN s_kunnr
    AND vkorg IN s_vkorg
    AND vstel IN s_vstel
    AND lfart NOT IN r_del_types_exclude.
    Waiting for quick response.
    Best regards,
    BDP

    Bansidhar,
    1) You need to add a check to make sure that internal table t_dels_tvpod (used in the FOR ALL ENTRIES clause) is not blank. If it is blank skip the SELECt statement.
    2)  Check the performance with and without clause 'AND lfart NOT IN r_del_types_exclude'. Sometimes NOT causes the select statement to not use the index. Instead of 'lfart NOT IN r_del_types_exclude' use 'lfart IN r_del_types_exclude' and build r_del_types_exclude by using r_del_types_exclude-sign = 'E' instead of 'I'.
    3) Make sure that the table used in the FOR ALL ENTRIES clause has unique delivery numbers.
    Try doing something like this.
    TYPES: BEGIN OF ty_del_types_exclude,
             sign(1)   TYPE c,
             option(2) TYPE c,
             low       TYPE likp-lfart,
             high      TYPE likp-lfart,
           END OF ty_del_types_exclude.
    DATA: w_del_types_exclude TYPE          ty_del_types_exclude,
          t_del_types_exclude TYPE TABLE OF ty_del_types_exclude,
          t_dels_tvpod_tmp    LIKE TABLE OF t_dels_tvpod        .
    IF NOT t_dels_tvpod[] IS INITIAL.
    * Assuming that I would like to exclude delivery types 'LP' and 'LPP'
      CLEAR w_del_types_exclude.
      REFRESH t_del_types_exclude.
      w_del_types_exclude-sign = 'E'.
      w_del_types_exclude-option = 'EQ'.
      w_del_types_exclude-low = 'LP'.
      APPEND w_del_types_exclude TO t_del_types_exclude.
      w_del_types_exclude-low = 'LPP'.
      APPEND w_del_types_exclude TO t_del_types_exclude.
      t_dels_tvpod_tmp[] = t_dels_tvpod[].
      SORT t_dels_tvpod_tmp BY vbeln.
      DELETE ADJACENT DUPLICATES FROM t_dels_tvpod_tmp
        COMPARING
          vbeln.
      SELECT vbeln
        FROM likp
        INTO TABLE lt_dels_tvpod
        FOR ALL ENTRIES IN t_dels_tvpod_tmp
        WHERE vbeln EQ t_dels_tvpod_tmp-vbeln
        AND erdat IN s_erdat
        AND bldat IN s_bldat
        AND podat IN s_podat
        AND ernam IN s_ernam
        AND kunnr IN s_kunnr
        AND vkorg IN s_vkorg
        AND vstel IN s_vstel
        AND lfart IN t_del_types_exclude.
    ENDIF.

Maybe you are looking for