Increase the performance of the query.

Request:_

QUERY:

SELECT DET. ECL_LOG_NUMBER AS LOG_NUMBER, DET. ECL_CREATION_DATE AS CREATION_DATE, upper (det. ECL_DESCRIPTION) AS A DESCRIPTION.
DET. ECL_REQUESTED_DATE AS REQUESTED_DATE, upper (det. ECL_REQUESTOR_NAME) AS NAME, DET. GET ENV, DET ECL_ENVIRONMENT. ECL_EXECUTED_STATUS AS EXE_STATUS,
fun_ecl_status (pos. ECL_LOG_NUMBER) as APPROVERSSTATUS,
decode (STA. ECL_APPROVER1, "APPROVED", STA. ECL_APPROVER1 | ' ' || TO_CHAR (STA. ECL_APPROVER1_DATE, 'DD-MM-YYYY HH24:MI:SS'),
"REJECTED", STA. ECL_APPROVER1 | ' ' || TO_CHAR (STA. ECL_APPROVER1_DATE, 'DD-MM-YYYY HH24:MI:SS'),
STA. ECL_APPROVER1) AS APPROVER1,
decode (STA. ECL_APPROVER2, "APPROVED", STA. ECL_APPROVER2 | ' ' || TO_CHAR (STA. ECL_APPROVER2_DATE, 'DD-MM-YYYY HH24:MI:SS'),
"REJECTED", STA. ECL_APPROVER2 | ' ' || TO_CHAR (STA. ECL_APPROVER2_DATE, "DD-MM-YYYY HH24:MI:SS"), STA. ECL_APPROVER2) AS APPROVER2,
decode (STA. ECL_APPROVER3, "APPROVED", STA. ECL_APPROVER3 | ' ' || TO_CHAR (STA. ECL_APPROVER3_DATE, 'DD-MM-YYYY HH24:MI:SS'),
"REJECTED", STA. ECL_APPROVER3 | ' '|| TO_CHAR (STA. ECL_APPROVER3_DATE, "DD-MM-YYYY HH24:MI:SS"), STA. ECL_APPROVER3) AS APPROVER3,
decode (STA. ECL_APPROVER4, "APPROVED", STA. ECL_APPROVER4 | ' ' || TO_CHAR (STA. ECL_APPROVER4_DATE, 'DD-MM-YYYY HH24:MI:SS'),
"REJECTED", STA. ECL_APPROVER4 | ' '|| TO_CHAR (STA. ECL_APPROVER4_DATE, "DD-MM-YYYY HH24:MI:SS"), STA. ECL_APPROVER4) AS APPROVER4,
decode (STA. ECL_APPROVER5, "APPROVED", STA. ECL_APPROVER5 | ' ' || TO_CHAR (STA. ECL_APPROVER5_DATE, 'DD-MM-YYYY HH24:MI:SS'),
"REJECTED", STA. ECL_APPROVER5 | ' '|| TO_CHAR (STA. ECL_APPROVER5_DATE, "DD-MM-YYYY HH24:MI:SS"), STA. ECL_APPROVER5) AS APPROVER5
OF DET, ECL_STATUS_INFO STA ECL_DETAILS
WHERE DET. ECL_LOG_NUMBER = STA. ECL_LOG_NUMBER
AND DET. ECL_EXECUTED_STATUS! = 'END '.
ORDER OF DET. ECL_LOG_NUMBER DESC;






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

Execution plan
----------------------------------------------------------
Hash value of plan: 2429005956

---------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
---------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 71. 10508. 9 (23) | 00:00:01 |
| 1. SORT ORDER BY | 71. 10508. 9 (23) | 00:00:01 |
|* 2 | HASH JOIN | 71. 10508. 8 (13) | 00:00:01 |
|* 3 | TABLE ACCESS FULL | ECL_DETAILS | 71. 5254 | 4 (0) | 00:00:01 |
| 4. TABLE ACCESS FULL | ECL_STATUS_INFO | 84. 6216 | 3 (0) | 00:00:01 |
---------------------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):
---------------------------------------------------

2 - access("DET".") ECL_LOG_NUMBER "=" STA ". ("' ECL_LOG_NUMBER")
3 - filter("DET".") ECL_EXECUTED_STATUS' <>'END')



the higher cost is 9%. final analysis two tables are 6 July 2012. The index also are thr in the two tables for column (ECL_LOG_NUMBER).
The indexes are also analyzed on 6 July 2012. in the two 84rec in the table are present (DET ECL_DETAILS, ECL_STATUS_INFO STA).
Result Final query is fetching 71 records, both Table full access in the execution plan.
Function created from the index function (fun_ecl_status).
After having removed order by clause... the cost is reduced. but request team need to order of folders in the order descending.
Please suggest me what I should do to get better query performance.

The parameter passed to the log_Nmbr function is: the ECL_LOG_NUMBER detective, who is limited in the query to be the same as the STA. ECL_LOG_NUMBER. So, when you retrieve a record of ecl_status_info in the function, it will be the same ecl_status_info record that you have selected in the query.

Tags: Database

Similar Questions

  • The BLASTP_ALIGN query performance decreases as increases the size table Ref?

    Newbie here.

    I'm using Oracle 11.2.0.3.

    I am currently running and a loop through the cursor according to who uses the tool BLASTP_ALIGN from Oracle:

    FOR MyALIGN_TAB IN

    (

    Select a.query_string, H.AA_SEQUENCE target_string, t_seq_id, pct_identity, alignment_length, incompatibilities, positive, gap_openings, gap_list, q_seq_start, q_frame, q_seq_end, t_seq_start, t_seq_end, t_frame, score, wait

    from (select t_seq_id, pct_identity, alignment_length, incompatibilities, positive, gap_openings, gap_list, q_seq_start, q_frame, q_seq_end, t_seq_start, t_seq_end, t_frame, score, wait

    table (BLASTP_ALIGN ((p_INPUT_SEQUENCE SELECT query_string FROM DUAL),

    CURSOR (Select GB_ACCESSION, AA_SEQUENCE from HUMAN_DB1. HUMAN_PROTEINS),

    1-1, 0, 0, 'PAM30',. 1, 10, 1, 2, 0, 0)

    )

    ),

    (SELECT p_INPUT_SEQUENCE FROM DUAL Query_string).

    HUMAN_DB1. HUMAN_PROTEINS H

    WHERE UPPER (t_seq_id) = UPPER (H.gb_accession) and gap_openings = 0

    )

    LOOP


    This initial query works relatively well (about 2 seconds) on a table target of approximately 20,000 documents (reproduced above, as the HUAMN_DB1. Table HUMAN_PROTEINS. However, if I had to choose a selected target table that contains approximately 170 000 records, the query performance are significantly reduced in about 45 seconds. The two tables have identical ratings.


    I was wondering if there are ways to improve the performance of BLASTP_ALIGN on large tables? There only seems to be a lot of documentation on BLASTP_ALIGN. I could find this (http://docs.oracle.com/cd/B19306_01/datamine.102/b14340/blast.htm), but it wasn't that useful.


    Any ideas would be greatly appreciated.



    In case one is interested... it looked like the AA_SEQUENCE column in the following slider: SLIDER (Select GB_ACCESSION, AA_SEQUENCE from HUMAN_DB1. HUMAN_PROTEINS) was a CLOB field. In my second target, my column correspodoning table was VARCHAR2. One hypothesis is that BLASTP_ALIGN made a VARCHAR2-> CLOB conversion internally. I changed the table to have a CLOB column and with success against BLASTP_ALIGN 170 000 documents about 8 seconds (not much, but better than 45).

    I will mark it as answered.

  • increase the performance of the query how

    SELECT * from load_log
    where
    filetype = ' O/c '.
    AND EXISTS (SELECT view_orders FROM ' 1')
    WHERE O_ftype = ftype
    AND o_loadno = loadno - < < this line
    AND o_cocode = 1)


    HOW TO INCREASE THE PERFORMENCE OF QUERY.
    THE view_orders IS THE VIEW THAT CREATED 4 TABLES THAT HAVE SAME COLUMSN EXCEPT FTYPE


    If I remove this line very quickly run the query
    AND o_loadno = loadno - < <



    PLEASE GIVE ME SOME IDEAS/SUGGESTIONS.

    Thank you

    STONE ROUGH

    hard_stone wrote:
    the index of the user

    May be you want to re - edit your post: I asked the information only for the "PRT_ORDER_CONFIRM_LOAD" index, not for all indexes.

    Goes the same for the table, only for the table 'PRT_ORDER_CONFIRM '.

    This list of values without the name of the index is useless, and a line for this index should be enough.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • Increase the performance of MAC with the SSD upgrade

    I have a 21.5-inch iMac model 14.1 (end 2013) with 8 GB of memory and a 1 TB drive. On this, I use some applications in memory such as Adobe CS 5.5 and VMWare Fusion 8.1.1. I have Applecare on the machine until September 2017. I often find myself running out of memory. My goto solution would be to increase the memory and replace the hard drive with an SSD. I fear, however, that this cancels my Applecare. My research indicates that while that frowned upon, I can upgrade my memory and keep my Applecare as long as it is done by an authorized by Apple, but if I do the SSD I'm out of luck for the installed components. My thought is that I can get an external SSD and move the ' WIndows 10' VM (s), as well as expand and move the swapfiles for the SSD system.»

    My questions are am I right about the Applecare and warranty and I plan to use an external SSD to accelerate performance and ease the work of memory constraints?

    I have f

    I have a Macbook Air in 2010 and also a 2008 iMac - both with only 4 GB of memory (you have twice as much), both running El Capitan and the two with SSD - and perform very well. The 2008 iMac used to have a rotating disc which has recently failed, with the replacement of SSD, it is a remarkable transformation with the new SSD, it seems very quickly for me. Both have Photoshop CS4, which is not used much more, but they run this software very well, as well as MS Office 2011 and other programs such as Mail, Safari, Firefox, etc. (Firefox + Photoshop together put a noticeable load on machines, in fact, but while I sometimes hear the fans come on the Macbook Air, it maintains not up very well) No slowdown) You'll be in great shape with a SSD for your newer computer. These old machines that I use have Core 2 Duo CPUs, chips relatively slow, but they seem very quickly with the SSD.

    You will need to check with Apple directly on your AppleCare and so that would be affected. I don't know that anyone is not Apple should trust this question.

  • RAM 1 GB upgrade will increase the performance of the Satellite Pro M30?

    My ram size is currenty 512 MB.
    I have the model Satellite Pro M30.
    As the old model, my laptop would be faster if I increase to 1 GB

    Hello

    Of course, the 1 GB of RAM would help increase the performance of your laptop.
    It must be useful for faster loading applications.
    You will notice also that your tools and other software will be faster.

    To upgrade to the 1 GB RAM, you would need two 512 MB modules.
    Usually the PC2700 DDR - RAM 512 MB module must be compatible.

    Welcome them

  • To increase the performance of the system (Windows XP, Vista, 7 and 8)

    Hi all

    Most people enjoy to keep their work in the computer and working properly, as long as possible. I have provided a few interesting documents that they will help you to keep your system as recent as possible concerning regular maintenance. I am able to provide information for systems already in Windows XP and as recent as Windows 8. What's even better is that these changes and updates can be performed without modification or upgrade any hardware.

    Increase the performance of the XP system

    Increase the Performance of the system Vista

    Increase the performance of the system 7

    Increase the performance of the system 8

    Thank you

    I hope this helps everyone.

  • Re: Satellite L500-19Z - how to increase the performance of the game?

    Hey

    Basically, I have a Toshiba Satellite L500-19z, with chipsets Intel Series 4 express. I know this isn't a particularly good game, but surely the performance of game should be reasonable?

    I get 80% of the time lag - while on my old laptop (which costs no more than £200) I could play World of Warcraft on it no problem (I played the Sims3 on this laptop and had very few problems. I'm playing Dragon Age, but it is almost impossible.) My laptop is not more than 8 months old.

    I just want to know if there is a way to increase the performance of the game? I thought that maybe to connect my laptop to a PC Tower, but that could lead to the worst game performance, so I said.
    I'm sure I can't replace the graphics card, I've updated my drivers, defragment disks and so on.

    Any help is really appreciated, thanks in advance.

    Hello

    Is there anything to do to increase game performance. It depends on the graphics card and Intel cards are not designed for games, they are a good choice for mobile use because they don t need a lot of power.
    In addition, the peut t graphics card be exchanged, s thereby.

    It s always depending on the game that you can play. Therefore, check the system requirements of all the games you want to play and if your graphics card is supported. Not all games support all graphics cards.

    You must also use low graphics settings in each game. You can use the parameters of t.

    For example on my Satellite U400, possessing the same Intel graphics card, I can play Half Life 2 which has already 5 years but always low medium graphics settings.

  • I own a Macbook pro mid 2012. Now I want to increase the RAM of 4 GB to 8 GB, please suggest if this update will help me to improve my performance to macbook.

    I own a Macbook pro mid 2012. Now I want to increase the RAM of 4 GB to 8 GB, please suggest if this update will help me to improve my performance to macbook.

    It will help in cases where the applications require more than 4 GB of RAM.  Otherwise, there will be no noticeable difference.  If you really want to increase the speed, an SSD is the best option.  They cost about 3 x's + more than a traditional HDD of same capacity...

    Ciao.

  • Increase the maximum number of query results

    Hello

    I need to increase the maximum search results, when I'm looking for data with data-> ValueMaxCount

    I'd like to 2000

    I tried tho change it with the help of the property page and the example given.

    The result looks like this:

    Define DataFinder = Navigator.ConnectDataFinder (Navigator.Display.CurrDataFinder.Name)
    Set IndexedFileProperties = DataFinder.GetIndexedProperties (eSearchFile)
    Set IndexedProperty = IndexedFileProperties ("fileName")
    Define ValueList = IndexedProperty.GetValueList
    DataFinder.ValueMaxCount = 2000
    Define ValueList = IndexedProperty.GetValueList

    But the quantity of serach result remains at 200

    I am referring to the wrong object or do I need to increase it to a certain point?

    Concerning

    Janick

    Hi Janick,

    your script increases the number of values that are returned if you ask for all values that are indexed to a specific property (in the BROWSER QueryForm you will receive this list by clicking the... button to the right of the line a condition).

    To increase the maximum number of search results, you would use the MaxCount property for the elements of results.

    DataFinder.Results.MaxCount = 2000' in the search without the GUI

    or

    Navigator.Display.CurrDataFinder.ResultsList.Elements.MaxCount ' in the search with the BROWSER GUI

    What version of DIAdem do you use? 2015 tiara, it is also possible to determine the maximum number of search results in the search method:

    DataFinder.SearchElements (Query, 2000)

    I hope this helps.

    Good day

    Eva

  • ways to increase the performance of the processor

    It might be a silly thing to ask, but I can use a 4 GB USB key to increase the performance of the processor

    during execution of the movies netflix and Amazon to steam. I have 17.4 GB of free space, but then the streaming of the CPU usage is maxed out

    c increace disk space I made the following suggestions given by someone else in the community:

     You can create more free space in C by doing one of the following suggested measures.

    The default allocation for the restoration of the system is 12% on your C partition is more generous. I have them would be reduced by 700 MB. Make my computer right click on your icon, and select System Restore. Place the cursor on your C drive select settings but this time find the slider and drag it to the left until it shows 700 MB and output. When you get to the settings screen, click on apply and OK and leave.

    A flaw that might be useless which is for temporary internet files, especially if you keep no copies on the disk offline. Setting the default value is 3% of the walk. Depending on your attitude to copies offline, you could bring it to 1% or 2%. In Internet Explorer, select Tools, Internet Options, general, temporary Internet files, settings to make the change. At the same time, look at the number of days, the story stands.

    The default allocation for the basket is 10% of the disk. Change to 5%, which should be enough. In Windows Explorer hover over your Recycle Bin, right click and select Properties, Global and move the slider from 10% to 5%. However, try to let you become so complete that if it is complete and you delete a file by mistake it will bypass the Recycle Bin and have gone forever.

    Operating system

    MS Windows XP Professional SP3 32-bit

    CENTRAL PROCESSING UNIT

    Intel Pentium III - M

    Tualatin 0.13 technology

    RAM

    1.00 GB OF SDRAM

    Motherboard

    IBM 2648AU0 (no) 52 ° c.

    Graphics

    ThinkPad TV (1024x768@60Hz)

    S3 Graphics SuperSavage/IXC 1014

    Hard drives

    29.3 GB IC25N030ATCS04-0 (PATA) 47 ° C

    Optical drives

    HITACHI DVD - ROM GD-S250

    Audio

    Intel (r) 82801 CA/CAM AC 97 Audio Controller

    Hello

    Right-click on any video 'flash' and select 'Settings' in the context menu, select the option "use hardware acceleration"...

    You have a graphics card installed... flash videos will / should use his memory for buffering streaming.

    go

    Start > Control Panel > drivers

    or look for updates of your display driver...

    or

    go

    Start > run > dxdiag > display tab, a diagnosis of your display drivers.

  • is it possible to use external memory to increase the performance of my computer?

    I have a slow xp and each program/app/files in an external drive.
    But I want to know if I can improve the performance of my control memory left him in the external drive.

    Hi cesar vidal,.

    1. What is the total capacity of the hard drive primary?
    2. Since when are you facing problems of performance on the computer?

    Method 1

    There is no way the use of the memory or the space left in the external drive to increase the performance of the computer.

    See the article and check if it helps increase the performance of the computer.

    Slow PC? Optimize your computer for peak performance

    http://www.Microsoft.com/athome/Setup/optimize.aspx

    Method 2

    It is possible that some third-party programs installed on the computer is at the origin of the performance problem.

    I suggest that you put the computer in a clean boot state and check if it helps.

    To help resolve the error and other messages, you can start Windows XP by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    See the link below to learn more about how to clean boot.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    (a) click Start, type msconfig in the search box and press ENTER.

    (b) If you are prompted for an administrator password or for confirmation, type your password or click on continue.

    (c) under the general tab, click the Normal startup option, and then click OK.

    (d) when you are prompted to restart the computer, click on restart.

  • I want to increase the performance of the PC using Readyboost

    Here are my stats to computer

    Windows vista home (32-bit) sp2
    Intel Pentium Dual CPU E2160 @ 1.80 Ghz
    2 GB of RAM
    now I want to increase the performance of the pc using readyboost
    How can I do
    also how can I get the max of readyboost performance
    is there a support for an external device?
    thnx in advance
    Original title: readyboost

    Hello

    'ram 2 GB'

    You have too much RAM for Readyboost work effectively.

    ReadyBoost is designed for machines that have between 500 MB - 1 GB RAM

    The physical RAM you have installed, less you will notice an improvement using Readyboost.

    This is a very good tutorial on how to configure Readyboost:

    http://www.bleepingcomputer.com/tutorials/using-Windows-ReadyBoost-to-increase-performance/

    See you soon.

  • If I activate 2 processors in msconfig, it will increase the performance of my computer... !

    If I activate 2 processors in msconfig > advanced > number of processors to 2 it will increase the performance of my computer... !

    Original title: two processors

    In most cases, you will probably have to use these options, but they can come in handy. For example, if you think that a startup problem is caused by the presence of more than one processor, you can limit the number of processors used to boot the system by activating the checkbox number of processors, and specifying a number.

    Mr President I'm on hp xw6400 workstation it has 2 processors and I use windows 10 on it, I want to run the two processors at the same time to improve performance is anyway you can tell me how...

    Hello

    Installation is possible, however, the operating system will use a processor at a single time. There are also the prerequisites if you want this kind of installation. Even if it is possible, we have no advice to use both processors at the same time, because performance will always be bottleneck depending on the hardware and the operating system you are using.

    Kind regards.

  • Rewrite the query to improve the performance and the optimized below cost.

    Oracle 10g.

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

    Query

    UPDATE FACETS_CUSTOM. MMR_DTL

    SET

    CAPITN_PRCS_IND = 2,

    FIL_RUN_DT = Current_fil_run_dt,

    ROW_UPDT_DT = dta_cltn_end_dttm

    WHERE CAPITN_PRCS_IND = 5

    AND HSPC_IND = 'Y '.

    AND EXISTS (SELECT 1

    OF FACETS_STAGE. CRME_FUND_DTL_STG STG_CRME

    WHERE STG_CRME. MBR_CK = MMR_DTL. MBRSHP_CK

    AND MMR_DTL. PMT_MSA_STRT_DT BETWEEN STG_CRME. ERN_FROM_DT AND STG_CRME. ERN_THRU_DT

    AND STG_CRME. FUND_ID IN ('AAB1', '1AA2', '1BA2', 'AAB2', '1AA3', '1BA3', ' 1 B 80 ', ' 1 HAS 80 '))

    AND EXISTS (SELECT 1

    OF FACETS_CUSTOM. FCTS_TMS_MBRID_XWLK XWLK

    WHERE XWLK. MBR_CK = MMR_DTL. MBRSHP_CK

    AND MMR_DTL. PMT_MSA_STRT_DT BETWEEN XWLK. HSPC_EVNT_EFF_DT AND XWLK. HSPC_EVNT_TERM_DT);

    Explain the plan of the query

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

    Hash value of plan: 3109991485

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

    | ID | Operation | Name                  | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | UPDATE STATEMENT.                       |     1.   148. 12431 (2) | 00:02:30 |

    |   1.  UPDATE                       | MMR_DTL |       |       |            |          |

    |   2.   SEMI NESTED LOOPS.                       |     1.   148. 12431 (2) | 00:02:30 |

    |*  3 |    HASH JOIN RIGHT SEMI |                       |    49.  5488. 12375 (2) | 00:02:29 |

    |   4.     TABLE ACCESS FULL | FCTS_TMS_MBRID_XWLK |  6494 | 64940 |    24 (0) | 00:00:01 |

    |*  5 |     TABLE ACCESS FULL | MMR_DTL |   304K |    29 M | 12347 (2) | 00:02:29 |

    |*  6 |    TABLE ACCESS BY INDEX ROWID | CRME_FUND_DTL_STG |     1.    36.     5 (0) | 00:00:01 |

    |*  7 |     INDEX RANGE SCAN | IE1_CRME_FUND_DTL_STG |     8.       |     1 (0) | 00:00:01 |

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

    Information of predicates (identified by the operation identity card):

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

    3 - access("XWLK".") MBR_CK "=" MMR_DTL. " ("' MBRSHP_CK")

    filter ("XWLK". "HSPC_EVNT_EFF_DT" < = INTERNAL_FUNCTION ("MMR_DTL". " PMT_MSA_STRT_DT') AND

    'XWLK '. "" HSPC_EVNT_TERM_DT "> = INTERNAL_FUNCTION ("MMR_DTL". "PMT_MSA_STRT_DT")) "

    5 - filter("CAPITN_PRCS_IND"=5 AND "HSPC_IND"='Y')

    6 filter (("STG_CRME". "FUND_ID" = "1 HAS 80 ' OR 'STG_CRME'." " FUND_ID "="1AA2"OR"

    'STG_CRME '. "FUND_ID"= '1AA3' OR 'STG_CRME'. "FUND_ID" = "1 B 80 ' OR 'STG_CRME'. '. "FUND_ID" = "1BA2" OR "

    'STG_CRME '. "FUND_ID"= "1BA3" OR "STG_CRME". "FUND_ID"= "AAB1" OR "STG_CRME". ("FUND_ID"="AAB2") AND

    'STG_CRME '. "" ERN_FROM_DT "< = INTERNAL_FUNCTION ("MMR_DTL". "PMT_MSA_STRT_DT") AND "

    'STG_CRME '. "" ERN_THRU_DT "> = INTERNAL_FUNCTION ("MMR_DTL". "PMT_MSA_STRT_DT")) "

    7 - access("STG_CRME".") MBR_CK "=" MMR_DTL. " ("' MBRSHP_CK")

    I could not optimize this query for best performance and optimized the cost... Can someone guide me on this.

    Thank you

    DS

    You think you're going to lines updates 85K, Oracle think it will update a line.

    At the time where the existence of the first test runs that oracle think already up to 49 lines, which is probably why he uses the loop join nested for the second test. (In your version of Oracle, the subquery introduced existence a very bad assumption (small) on the amount of data will survive).

    It is possible that you will get better performance if you hint Oracle using a hash join for testing the existence - and you might want to think what test will eliminate most of the data and that we can first force.

    Having said that, however, note that MMR_DTL research is a considerable fraction of the cost of the query - and an analysis is an easy thing for Oracle cost properly - if, despite your comments on update a column with a clue to this topic, you will find that the query can be more effective if you use an index. This is more likely to be the case if data ' WHERE CAPITN_PRCS_IND = 5 AND HSPC_IND = 'Y' "is well grouped (perhaps the latest data added to the table).". "  You could then reduce the cost of maintaining this index by creating an index based on a feature that indexes only the lines where the predicate are both true so that the 2 update deletes the index entries and allows the index remain as thin as possible.

    Concerning

    Jonathan Lewis

  • Performance issue with the query when join OKS and tables of the IB

    Hello

    I'm developing an integration for the automation of RMA through repair. The type of repair order is based on the details of the guarantee. This check must be made for each record.

    Request for detailed below, I wrote, but it of a long way and slows down my program. Without this validation, it works perfectly.

    The problem is the join of tables with OKS IB, he kills performance. I also try to my side,

    any suggestion or help is appreciated. Here's the query in the program:

    SELECT DISTINCT (TYPE |) '-' || service | '-' || status)

    IN v_war_details

    FROM (SELECT TO_NUMBER (linesb.line_number) line,

    DECODE

    (fnd_profile. VALUE

    ('OKS_LINE_MIRR_NAME_OR_DESC'),

    'DISPLAY_NAME', sysitems.concatenated_segments,

    "DISPLAY_DESC", sysitems.description

    ) service.

    linestyletl.NAME TYPE,

    status of ststl.meaning,

    start_date linesb.start_date,

    linesb.end_date end_date,

    oks_misc_util_web.duration_period

    (linesb.start_date,

    linesb.end_date

    ) DURATION OF,.

    TimeUnit.unit_of_measure_tl period

    Of okc_k_lines_b linesb,.

    okc_k_lines_tl linestl,

    okc_line_styles_b linestyleb,

    okc_line_styles_tl linestyletl,

    okc_k_headers_all_b hdr,

    oks_k_lines_b slines,

    okc_k_items kitems,

    mtl_system_items_b1_kfv sysitems,

    okc_statuses_b stsb,

    okc_statuses_tl ststl,

    mtl_units_of_measure_tl timeunit,

    okc_lookups_v rentype,

    Glu mtl_units_of_measure_tl

    WHERE linesb.cle_id IS NULL

    AND linesb.ID = linestl.ID

    AND linestl. LANGUAGE = USERENV ("LANG")

    AND linesb.lse_id = linestyleb.ID

    AND linesb.lse_id (1, 12, 14, 19, 46)

    AND linestyleb.ID = linestyletl.ID

    AND linestyletl. LANGUAGE = USERENV ("LANG")

    AND linesb.chr_id = hdr.ID

    AND linesb.ID = slines.cle_id

    AND linesb.ID = kitems.cle_id

    AND kitems.object1_id1 =

    SysItems.inventory_item_id

    AND kitems.object1_id2 =

    SysItems.organization_id

    AND kitems.uom_code = uom.uom_code (+)

    AND unit of measure. LANGUAGE (+) = USERENV ("LANG")

    AND linesb.sts_code = stsb.code

    AND stsb.code = ststl.code

    AND ststl. LANGUAGE = USERENV ("LANG")

    AND timeunit.uom_code =

    oks_misc_util_web.duration_unit

    (linesb.start_date,

    linesb.end_date

    )

    AND timeunit. LANGUAGE = USERENV ("LANG")

    AND linesb.line_renewal_type_code = rentype.lookup_code (+)

    AND rentype.lookup_type (+) =

    'OKC_LINE_RENEWAL_TYPE '.

    AND (IN) hdr.ID

    SELECT kh.ID

    Of okc_k_headers_all_b kh.

    okc_k_lines_b kl,

    Ki okc_k_items,

    okc_line_styles_v ks,

    csi_item_instances c,

    mtl_system_items_b I have

    WHERE kh.org_id = p_org_id

    AND c.instance_id = p_instance_id

    AND c.serial_number = p_serial_num

    AND i.inventory_item_id =

    p_inventory_item_id

    AND kh.contract_number_modifier IS NULL

    -can be filled

    AND kh.ID = kl.dnz_chr_id

    AND kh.ID = ki.dnz_chr_id

    AND kl.ID = ki.cle_id

    AND kl.lse_id = ks.ID

    AND IN ki.jtot_object1_code

    ("OKX_CUSTPROD")

    AND c.last_vld_organization_id =

    i.organization_id

    AND TO_NUMBER (ki.object1_id1) =

    c.INSTANCE_ID

    AND c.inventory_item_id =

    i.inventory_item_id))

    Service = 'GUARANTEE '.

    AND TRUNC (SYSDATE) BETWEEN start_date AND end_date;

    Not sure where it would be so I put it in the section SQL/PLSQL.

    Kind regards

    Prashant

    Found the solution

    AND TO_NUMBER (ki.object1_id1) = c.instance_id

    replaced by to_char (c.instance_id) = ki.object1_id1 AND

Maybe you are looking for