Need help to reduce the cost of my sql Query below 100 to optimize.

Can you please suggest how to reduce the COST of my SQL query? Is it possible to get the < 100 COST?

My goal:
------------------------

To recover the data of length (a column is in normalised_event: table) corresponding to each type of call (which is to extract the column rc.abbreviation in reference_code: table) in a given range of dates. So I wrote the following as SQL below:

------------------------------------------------------------------------------------------------------------------
Select nvl (sum (round(ne.duration/60,3)), 0), rc.abbreviation
Since the rc reference_code, normalised_event not
where to_char (rc.reference_code) = ne.full_path
and rc.reference_type_id = 505002 AND
trunc (don't. CHARGE_START_DATE) between trunc (to_date (January 1, 2008 "," dd-mm-yyyy hh24:mi:ss'))))
and trunc (to_date (January 1, 2009 "," dd-mm-yyyy hh24:mi:ss'))))
Rc.abbreviation group

-----------------------------------------------------------------------------------------------------------------

IAM using Toad Software which is taken in charge by oracle 9i.


Explain the plan above query is:

explain plan
Set statement_id = "mp01" for
Select nvl (sum (round(ne.duration/60,3)), 0), rc.abbreviation
Since the rc reference_code, normalised_event not
where to_char (rc.reference_code) = ne.full_path
and rc.reference_type_id = 505002 AND
trunc (don't. CHARGE_START_DATE) between trunc (to_date (January 1, 2008 "," dd-mm-yyyy hh24:mi:ss'))))
and trunc (to_date (January 1, 2009 "," dd-mm-yyyy hh24:mi:ss'))))
Rc.abbreviation group



Select LPad (' ', 2 *(Level-1)). Level | '.' || NVL (position 0). ' ' ||
Operation | ' ' || Options of | ' ' || Object_name | ' ' ||
Object_type | ' ' || Decode (id, 0, Statement_Id |) "Cost = ' | Position)
"Query plan.
From Plan_Table
Start with id = 0 and Statement_Id = 'mp01 ".
Connect Id Parent_Id = prior
And Statement_Id = 'mp01 ";


---------------------------Query Plan explained is----------------------------------------------------------

1.555 INSTRUCTION SELECT mp01 cost = 555
2.1 TYPE GROUP
3.1 FILTER
4.1 HASH JOIN
5.1 TABLE ACCESS BY INDEX ROWID REFERENCE_CODE
6.1 INDEX RANGE SCAN NON-UNIQUE I_REFERENCE_CODE_REF_TYPE
5.2 PARTITION RANGE ALL THE
6.1 TABLE ACCESS FULL NORMALISED_EVENT

-Automatic tracking of the SQl query is:.

recursive calls - 0
DB block gets - 0
compatible gets - 174
physical reads - 0
size - 104
Parse count (hard) - 0
Parse count (chess) - 0
run the County - 2
bytes sent via SQL * Net to dblink - 0
bytes received via SQL * Net from dblink - 0

I was wrong. Once again, this shows how it is dangerous to assume (I assumed that FBI was new in 10g because it is when I used them), and the power of the community to ensure that accurate information is provided.

John

Tags: Database

Similar Questions

  • Need help to reduce the size of the Interactive (Dynamic) PDF

    Hello

    Currently I use the trial version of Adobe LiveCycle Designer (Adobe Acrobat 9 Pro) and interactive work with pdf. My main problem is that when I change my original pdf using LiveCycle Designer, the size is almost doubled. Even if I just open it with LiveCycle designer and save it without any modification, the size is doubled.

    Initially, the size of my pdf was about 500ko but now after some modifications, the format is replaced almost 2 MB.

    I would really appreciate if you suggest me the way to reduce the size of my interactive pdf file. I'm ready to buy any version of LiveCycle Designer if it solved my problem.

    Looking forward to hear from you.

    Kind regards
    Kiran

    The fonts are often the cause.

    Steve

  • Need help on reducing the execution time of calc

    Hi all

    Please help me with this Calc.

    I have a motto calc calculation, which takes a few hours to complete.

    Please help me to improve the performance of this Calc.

    I use version 7.1.5 Essbase.

    The cube has the dimensions below.

    Time
    Measures
    Market
    Scenario of
    Year of manufacture
    Currency
    Entity (many members)
    Product (many members)

    Thanks in advance.
    Maddy

    Published by: Srinivas Madderla on April 30, 2010 05:21

    Make sure to set down on the other dimensions as well members of lev0/sheet (produced... is that 'material'?, model year, because that will help the speed of calculation script.)

    In addition, what I dig me for entities, you will want to set out ONLY the entities with Canandian currencies to convert Canadian currency. Right now, you calculate all THE currencies for all entities and it's nonsense. Besides, databases of currency have usually just a member of the "national currency", which is just directly math (no conversion), then a "$" (or whatever the common currency is), who gets his individual currencies converted into the common currency. It seems you do is back out from a database that is already 100% USD values, and that you are trying to return to calculate the equivalent local values... but you do for each currency for each entity for many products and model years and daily data... it is not instantaneous. Even if you limit the calc for entities, I don't know if you get too much information to store all the currencies separately (vs "local" and "convert", but I leave that to you.)

  • Need help to clarify the concepts of PL/SQL

    Hi all...

    I write this kind of question because I have an exam on certification for PL/SQL... I am preparing for the same, but a few issues that I face are difficult for me...

    you create two triggers in database on two different tables. the two triggers performs exactly the same code. What can you do to modularize this feature?

    1. combine the two databases level trigger trigger a single statement.

    2. create a procedure with the code and change each database trigger to run the new procedure.

    3 handset the trigger two db in a single INSTEAD of trigger.

    4 - replace the trigger of the db with a deferred referential constraint.

    Please give a brief explanation also...

    Thanks in advance...

    What is the most difficult:

    2. create a procedure with the code and change each database trigger to run the new procedure.

    (1) you create a procedure

    create or replace myproc...

    Start

    ... Here is the my unique code

    end;

    (2) create a trigger myfirst...

    Start

    MyProc;

    end;

    (3) create a trigger mysecond...

    Start

    MyProc;

    end;

    mind that you cannot use DTL (commit, rollback) on the trigger.

  • Need help to diagnose the regular system analysis on iMac - processors maxed out

    I need help to identify the cause of a problem that occurs at least 2 - 3 times per day using my iMac (27-inch, mid 2010) running 10.11.5.

    I will use my iMac and then all at once things will start to really trolling. To the point of being completely unusable. Even if I'm able to move my cursor, then click to drag the windows around the screen nothing does really.

    I have iStat menus running so that can see graphics in my menu bar that all 4 cores are completely overfished. Occasionally, I was fast enough to launch the activity monitor to try to see what applications / services are responsible for, the use of % CPU column is completely empty of values, so I can't identify the culprits in a reliable way. I try to keep that column sorted by % CPU use in the hope that he could reveal something and normally it's the kernel_task who is up there.

    I use a Wacom Bamboo dated Tablet (MTE - 450 has) instead of a mouse, and at one point, I was convinced the pilot of PenTabletDrive it is based on was to blame. I contacted Wacom on this subject, and although there is no known issues they pointed out that although the latest drivers will allow me to use the tablet that they no longer support older devices. I was wondering if there was a problem of communication between the device and a driver that is no longer supported. I installed the latest driver supported for my tablet, but the problems persist.

    It may be interesting to note that, when my computer is in this semi-frozen state, I am able to launch the window enough force and quit all open applications leaving me with only the Finder. I guess that means that there are none of my apps running and it is probably one of the services. If I restart the Finder system grinds to a completely enclosed holt.

    I hope someone can let me know what I can find in the Console or elsewhere to help me finally zero in on what is to blame. I can share a log if that helps.

    Thank you in advance!

    Information that might be useful:

    Kept by I tend to be running: Adobe InDesign, Photoshop, Acrobat (all CC 2015), Mail, Safari with several tabs & Dropbox sync constantly.

    Download and run EtreCheck, created by one of his own assistants here in CSA. It is a diagnostic tool that is very useful for us to find problems. It will also give us additional specifications on your Mac. After his execution after the logfile here. It will never contain any personal information.

  • If my Macbook Pro is under Applecare extended it reduces the cost of replacing the battery?

    If my Macbook Pro is under Applecare extended it reduces the cost of replacing the battery?

    How much is usually charged for the replacement of the battery?   (in the United Kingdom)

    Thank you

    If it's a warranty or Apple Care + the covered replacement instance, it should be free.

    Otherwise:

    Mac Service Pricing - Support Apple laptops

    https://support.Apple.com/en-GB/Mac-notebooks/repair/service/pricing

    13/15 inch MacBook Pro £99 INCLUDING VAT.
  • Need help to remove the zeros on the right

    Hello.

    I need help to replace the zeros in the string.

    I have a string which is the output of the network packet. There are a few trailing zeros in the package.

    I don't see them in normal mode, but the size of the string tells me that it's bigger then it looks like.

    When I pass in hexadecimal mode, you can see zeros.

    I tried to use the find/replace function allows you to search for 0 and replace it with an empty string constant. But, for some reason any, that he took no zeros.

    I need to stop the string that follows * 69.

    Show your code.  You won't find and replace with all zeroes.  These 00 in hex mode they are null characters.  (not printable byte with a value of zero).  You need search and replace on that character.  (replace string should look like 00, when it is set to display the hexadecimal code.

  • cq57: need help cq57 enter the password administrator or power on password... deisabled system 58555314

    need help cq57 enter the password administrator or power on password... deisabled system 58555314

    Thank you!!!

    @clatimer

    Enter 47433930

    REO

  • Need help in using the ActiveX to retrieve a VARIANT

    Need help in using the ActiveX to retrieve a VARIANT.

    Variant is shown as var {VT_Ul1, 1} in debugging

    By using the following

    HR = CA_VariantGetShort (& var, &value);)

    I get 0 for my answer instead of 1.

    Answered my own question.

    VT_Ul1 is an unsigned char and not a short.

  • I need help to Flash the bios. I have an Aspire 5810TZ. I start and it just says: "acer".

    I need help to Flash the bios. I have an Aspire 5810TZ. I start and he just says "acer" and goes no further. I went to the download page for BIOS on us.acer.com and it has a zip file with 5 files:
    JM4151135.exe
    IN FLORIDA...
    GPC_V135.bin
    Readme.txt
    FLASH. BAT
    What should I do? I tried to copy the files on a USB key and turn on/off with Fn + ESC key. After the release the power button and pressed Fn - Esc another screen appears after 30 seconds. I gave up and gave her 30 minutes but it does nothing. I read another person that should be flashing power button online. I have to rename one of the files. Help, please!

    Aspire 5810TZ menu of frozen startup.

    I finally understand it.

    I couldn't start a back b/c drive, it me did not start anything.

    I followed this chain of logic:

    -Downloaded the bios (2.35 is the one that worked for me)
    -Find the exe file in the winflash file.
    -Extract the files in archive exe using the 7-Zip program
    -Find the .fd file and rename it to JM41X64. FD (I read in a forum was unique in my laptop)
    -Copied JM41X64. FD and FLASH it is. EXE on a USB
    -A the battery and the hard drive out.
    -With its trendy diet I supported Fn + Esc and that you press the power button once while ensuring that the Fn + Esc has been always held down.
    -J' waited 6 seconds and release the Fn + Esc and seen the flashing flash player
    -After about 10 minutes, restarted the machine and the bios as like new.

    Later, I found that there was a hard drive problem.

    I want you guys should help more. All I needed was the name of the JM41X64 file. FD and you don't know how many hours I put into trying to find how simpy bios flash. It is not that difficult for someone with a b.s. in computer science to learn how. Couldn't we a m.s. back b/c the bios drive was messed up. F12 didn't work.

  • Need help now for the live installation

    Need help now for the live installation

    Hello

    As described in the question, I understand that you need help. I will definitely help you however, I would be grateful if you could help me with more information to better understand the problem and resolving it.

    1. What is the problem you are experiencing during installation?

    2. That you install? Any software or operating system?

    3. How you try to install the software/Os/application?

    If you need live support from Microsoft then you can click on the link given below and check if it helps.

    https://support.Microsoft.com/en-us/contactus/

    Hope that this help, please write us back for any further assistance on this point, we will be happy to help you further.

  • Need help to install the network on laptop drivers

    I have a laptop of HP 2000-239WM and recently erased due to trying to sell. However, when I reinstalled everything back on the PC, no network drivers have been installed, so I have no access to the internet, wireless and wired. Should what programs I install via USB in order to solve this problem?

    The network adapter driver specifically requests the Ethernet, wifi and it...

    Hello McKinley,

    Thank you for visiting Microsoft Community and we provide a detailed description of the issue.

    According to the description, I understand that you need help to install the network drivers into the laptop.

    Certainly, I understand your concern and will try my best to help you.

    In order to install the NIC drivers in the system, I suggest to visit the link below and check if that helps.

    http://support.HP.com/us-en/drivers/selfservice/HP-2000-200-notebook-PC-series/5091493/model/5119030

    Note: Make sure you have access to the internet to another computer and download the network drivers using the USB and install on your laptop.

    I hope this information is useful.

    Please let us know if you need more help, we will be happy to help you.

    Thank you.

  • Need help to uninstall the game Deadspace

    Original title: uninstall Deadspace

    need help to uninstall the game Deadspace

    What you're looking for?
     
    Revo uninstaller can be faster.
     
  • Need help to retrieve the magnetic border

    As the title says, I need help to get the magnetic border thing (I don't know what his name). It helps a lot when I am rearraging my dekstop icon so that they are all neatly. Its the sticky feeling when you put an icon next to each other. I installed Stardock Fences before and which could lead to the missing or disabled?

    Hello

    • Right-click on an empty part of the desktop
    • Leave the mouse on the view
    • Click Align icons on the grid

    Tricky

  • Need help to identify the type of object in the loop of pl/sql

    Hello

    I need help to identify the Type of object declared beneath a procedure as shown below:

    I need to pass the parameter to the procedure as a TYPE of OBJECT and also refer to variables of Type Object in a loop

    create or replace type TEST_VALIDATION_REC is RECORD (order_num varchar2 (30),)

    number of inventory_item_id

    reserved_YN varchar2 (1).

    error_flag varchar2 (1).

    Error_message varchar2 (2000)

    );

    CREATE OR REPLACE TYPE VALD_TBL AS VARRAY (10000) OF TEST_VALIDATION_REC;

    PROCEDURE ADD_TO_ORD)

    p_lot_number_list IN VALD_TBL,

    p_ord_number IN Varchar2,

    p_user_id in NUMBER: = fnd_profile.value ('USER_ID'),-change 1.10

    p_responsibility_id in NUMBERS: = fnd_profile.value ('RESP_ID'),-change 1.10

    p_application_id IN VARCHAR2: = 'PO',-change 1.10

    x_error_flag OUT Varchar2,

    x_error_msg OUT Varchar2

    )

    In the above procedure, I had the VALD_TBL. Is it OK?

    And how in the loop if the records if I use:

    FOR indx1 IN 1.p_lot_number_list. COUNTY

    LOOP

    BEGIN

    SELECT

    inventory_item_id

    IN

    ln_item_id

    Of

    dummy_lot_tab

    WHERE

    lot_number = p_lot_number_list (indx1); - > how direct the item here?

    EXCEPTION

    WHILE OTHERS THEN

    ln_item_id: = NULL;

    END;

    Records are PL/SQL objects.  They are not the SQL objects.  You can create a SQL TYPE (schema level) as a collection (variable-tables only, tables nested).

    So therefore your first statement is syntactically incorrect

    CREATE OR REPLACE TYPE TEST_VALIDATION_REC IS RECORD
    (order_num VARCHAR2(30),
    inventory_item_id NUMBER,
    reserved_YN VARCHAR2(1),
    error_flag VARCHAR2(1),
    Error_message VARCHAR2(2000)
    );
    

    You must put in an anonymous PL/SQL block or the stored procedure

    DECLARE
    
       TYPE test_validation_rec IS RECORD
       (
        order_num VARCHAR2(30),
        inventory_item_id NUMBER,
        reserved_YN VARCHAR2(1),
        error_flag VARCHAR2(1),
        error_message VARCHAR2(2000)
       );
    
       TYPE vald_tbl iS VARRAY(10000) OF test_validation_rec;
    
       lv_tbl vald_tbl;
    
    BEGIN
    
       lv_tbl := vald_tbl();
      -- insert your code here 
    
    END;
    

Maybe you are looking for