Dun understand why query took so long

Hi ,
I am running the following procedure:
INSERT INTO local_table SELECT a.RECTYPE, a.lotid, a.STEP_BEGIN_TIME, a.PRODUCTION_AREA, a.COMPLETION_CLASS, a.LOT_TYPE, a.LOT_PRIORITY, a.curr_mask_Count
FROM TEMP_ACTIVE_LOTID b , lotrun a
WHERE b.lotid = a.lotid ;
and i got the error :
ORA-04030: out of process memory when trying to allocate 16504 bytes (pga heap,ksm stack)
ORA-06512: at "NEUROMART.CAL_ACTIVELOT_ML_BY_RATIO_PROC", line 26
ORA-06512: at line 1
and it took a long time to finish execution so i TKPROFED the SQL statement
here's my explain plan :
SELECT STATEMENT, GOAL = RULE          Optimizer=RULE     
NESTED LOOPS                    
TABLE ACCESS FULL               Optimizer=ANALYZED     Object name=LOTRUN
INDEX UNIQUE SCAN               Optimizer=ANALYZED     Object name=LOTRUN_ACTIVE_LOT_PK
here's my TKPROF of the sql statement
SELECT a.RECTYPE, a.lotid, a.STEP_BEGIN_TIME, a.PRODUCTION_AREA, a.COMPLETION_CLASS, a.LOT_TYPE, a.LOT_PRIORITY, a.curr_mask_Count
FROM TEMP_ACTIVE_LOTID b , lotrun a
WHERE b.lotid = a.lotid
call count cpu elapsed disk query current rows
Parse 1 0.00 0.01 0 0 0 0
Execute 2 0.00 0.06 0 0 0 0
Fetch 2384 251.60 930.94 1550541 44434119 107 238400
total 2387 251.60 931.01 1550541 44434119 107 238400
Misses in library cache during parse: 1
Misses in library cache during parse: 1
Optimizer goal: RULE
Parsing user id: 18
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 4 0.00 0.01 0 0 0 0
Execute 5 0.00 0.06 0 0 0 2
Fetch 2385 251.60 930.94 1550541 44434120 111 238401
total 2394 251.60 931.01 1550541 44434120 111 238403
Misses in library cache during parse: 1
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 0 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
4 user SQL statements in session.
0 internal SQL statements in session.
4 SQL statements in session.
Trace file: ora_296127_sbt1.trc
Trace file compatibility: 8.00.04
Sort options: default
0 session in tracefile.
4 user SQL statements in trace file.
0 session in tracefile.
4 user SQL statements in trace file.
0 internal SQL statements in trace file.
4 SQL statements in trace file.
3 unique SQL statements in trace file.
71606 lines in trace file.
ques :
1. what does the TKPROF tells me abt the sql statement ?? i can see
featch from disk is so high --> Fetch 2385 251.60 930.94 1550541
2. what can i do the fetch ?
pls advise

Hi ,
not sure if anyone noticed :
Execution Plan
0 SELECT STATEMENT Optimizer=HINT: ALL_ROWS (Cost=95736 Card=2
41727 Bytes=13778439)
1 0 NESTED LOOPS (Cost=95736 Card=241727 Bytes=13778439)
2 1 TABLE ACCESS (FULL) OF 'LOTRUN' (Cost=95736 Card=2148183
0 Bytes=988164180)
3 1 INDEX (UNIQUE SCAN) OF 'LOTRUN_ACTIVE_LOT_PK' (UNIQUE)
Statistics
0 recursive calls
109 db block gets
45035927 consistent gets
1572371 physical reads
792 redo size
34941587 bytes sent via SQL*Net to client
2387838 bytes received via SQL*Net from client
29477 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
442127 rows processed
=========================
does the cardinality and the no of row processed needs to be the same ? it different 442127 rows processed VS Card=241727 ??
and i select a count(*) its 442820 (new rows were added form the hourly jobs)
the stats were gathers in 21st august does it mean it's outdated ?
rdgs

Similar Messages

  • HT3529 Can someone help me understand why my iMessage no longer works on my iPad

    Can someone help me understand why my iMessage no longer works on my iPad

    iOS: Troubleshooting Messages
    iOS: Troubleshooting FaceTime and iMessage activation

  • So like, I called my someone in FaceTime, and after 6 or more rings, the person answered, I asked why it took so long for her to answer and she said that she answered at the 1st or 2nd ring? Is she lying or is it just that it was a delay in FaceTime?

    I called someone in FaceTime and it rang 6 or more times and she answered, I asked her why it took her so long to answer, she said that she answered at the 1st or 2nd ring. Is it a FaceTime delay or anything? Or was she just lying?

    I think she's not lying, unless you have a reason to think that. The same thing can happen with a phone call. It can ring multiple times on your end and only ring once or twice on the other end.

  • Why check_ponit took very long time in some case?

    In our project, we have a check_ponit thread, we found some time check_ponit took very long time. Most case it took only several minisecond.
    The update data is same as quickly check_point case.
    What factor will impact checkponit time?

    Hello,
    Checkpoints write data from the log file(s) to the actual database files. That means it is affected primarily by the amount of data in the log that has not yet been checkpointed. This is usually how much data has been committed since the last checkpoint. It could also be affected by other disk activity on the same partition from any other aspect of the system.
    Regards,
    George

  • Using Table.Join formula takes extremly long time to get results.(Why Query Folding doesn't work?)

    Hi,
    I built a query with 4 tables inside (load from Oracle DB and two of them are quite big, more than millions of rows). After filtering, I tried to build relationships between tables using Table.Join formula. However, the process took extremly long time to
    bring out results (I ended the process after 15 mins' processing). There's a status bar kept updating while the query was processing, which is showed as  . I suppose
    this is because the query folding didn't working, so PQ had to load all the data to local memory first then do the opertion, instead of doing all the work on the source system side. Am I right? If yes, is there any ways to solve this issue?
    Thanks.
    Regards,
    Qilong 

    Hi Curt,
    Here's the query that I'm refering,
    let
        Source = Oracle.Database("reporting"),
        AOLOT_HISTS = Source{[Schema="GEN",Item="MVIEW$_AOLOT_HISTS"]}[Data],
        WORK_WEEK = Source{[Schema="GEN",Item="WORK_WEEK"]}[Data],
        DEVICES = Source{[Schema="GEN",Item="MVIEW$_DEVICES"]}[Data],
        AO_LOTS = Source{[Schema="GEN",Item="MVIEW$_AO_LOTS"]}[Data],
        Filter_WorkWeek = Table.SelectRows(WORK_WEEK, each ([WRWK_YEAR] = 2015) and (([WORK_WEEK] = 1) or ([WORK_WEEK] = 2) or ([WORK_WEEK] = 3))), 
        Filter_AlotHists = Table.SelectRows(AOLOT_HISTS, each ([STEP_NAME] = "BAKE" or [STEP_NAME] = "COLD TEST-IFLEX" or [STEP_NAME] = "COLD TEST-MFLEX") and ([OUT_QUANTITY] <> 0)),
        #"Added Custom" = Table.AddColumn(Filter_AlotHists, "Custom", each Table.SelectRows(Filter_WorkWeek, (table2Row) => [PROCESS_END_TIME] >= table2Row[WRWK_START_DATE] and [PROCESS_END_TIME] <= table2Row[WRWK_END_DATE])),
        #"Expand Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"WRWK_YEAR", "WORK_WEEK", "WRWK_START_DATE", "WRWK_END_DATE"}, {"WRWK_YEAR", "WORK_WEEK",
    "WRWK_START_DATE", "WRWK_END_DATE"}),
        Filter_AolotHists_byWeek = Table.SelectRows(#"Expand Custom", each ([WORK_WEEK] <> null)),
        SelectColumns_AolotHists = Table.SelectColumns(Filter_AolotHists_byWeek,{"ALOT_NUMBER", "STEP_NAME", "PROCESS_START_TIME", "PROCESS_END_TIME", "START_QUANTITY", "OUT_QUANTITY", "REJECT_QUANTITY",
    "WRWK_FISCAL_YEAR", "WRWK_WORK_WEEK_NO"}),
        Filter_Devices= Table.SelectRows(DEVICES, each ([DEPARTMENT] = "TEST1")),
        SelectColumns_Devices = Table.SelectColumns(Filter_Devices,{"DEVC_NUMBER", "PCKG_CODE"}),
        Filter_AoLots = Table.SelectRows(AO_LOTS, each Text.Contains([DEVC_NUMBER], "MC09XS3400AFK") or Text.Contains([DEVC_NUMBER], "MC09XS3400AFKR2") or Text.Contains([DEVC_NUMBER], "MC10XS3412CHFK") or Text.Contains([DEVC_NUMBER],
    "MC10XS3412CHFKR2")),
        SelectColumns_AoLots = Table.SelectColumns(Filter_AoLots,{"ALOT_NUMBER", "DEVC_NUMBER", "TRACECODE", "WAFERLOTNUMBER"}),
        TableJoin = Table.Join(SelectColumns_AolotHists, "ALOT_NUMBER", Table.PrefixColumns(SelectColumns_AoLots, "AoLots"), "AoLots.ALOT_NUMBER"),
        TableJoin1 = Table.Join(TableJoin, "AoLots.DEVC_NUMBER", Table.PrefixColumns(SelectColumns_Devices, "Devices"), "Devices.DEVC_NUMBER")
    in
        TableJoin1
    Could you please give me some hints why it needs so long to process?
    Thanks.

  • I would very much like to understand why Siri is being marketed as something new.  before the latest Iphone Siri was a free app.  Now it is no longer available???  Assumption is to use Siri I must buy a new iphone

    i would very much like to understand why Siri is being marketed as something new.  before the latest iphone  Siri was a free app which was present on my old iphone.  Recently purchased another 3G and Siri is is no longer available???  Assumption is to use Siri I must buy  the latest and greatest  iphone. 

    Siri that is in the iPhone 4S is "new". It is based on technology the old app used (Apple bought the company), but it has been extended, enhanced, improved and integrated into the OS in a way the old app never could.
    So, yes, now to use Siri you need an iPhone 4S. It is no longer available as a separate, third-party app.

  • Query taking too long to finish

    Hi,
    I'm running a query which is
    Delete from msg where ID IN (select ID from deletedtrans );
    It's taking too long to complete, it has been running for 24 hours already and not completed executing the query, I cancelled the query. I don't understand why it's taking too long, does anyone have any idea? I feel that this query should not take too long to complete

    That seems to be too small piece of information to comment anything.
    1. How many records are there in "deletedtrans" table ?
    2. How many records from "msg" table are expected to be deleted ?
    3. Are statistics up-to-date on "msg" and "deletedtrans" tables ?
    4. Is "ID" column defined as NULL or NOT NULL in both "msg" and "deletedtrans" tables ? (Not sure whether this will cause any problem, but...)
    5. Is this statement being executed when other users/applications are accessing/updating "msg" table ?

  • Query taking so long to execute.

    I have one table with 211 rows, When i am executing Delete from TEHSIL_TBL; its taking too long time to delete 211 rows. I execute explain plan then i am getting the following results.
    SQL> explain plan for delete from TEHSIL_TBL;
    Explained.
    SQL> @C:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlxpls.sql
    PLAN_TABLE_OUTPUT
    Plan hash value: 3350021484
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | DELETE STATEMENT | | 205 | 1435 | 1 (0)| 00:00:01 |
    | 1 | DELETE | TEHSIL_TBL | | | | |
    | 2 | INDEX FULL SCAN| PK_TEH_ID | 205 | 1435 | 1 (0)| 00:00:01 |
    Please suggest why that query taking so long tome to execute.
    Thanks in Advance...
    Asmit

    966523 wrote:
    I have one table with 211 rows, When i am executing Delete from TEHSIL_TBL; its taking too long time to delete 211 rows. I execute explain plan then i am getting the following results.
    SQL> explain plan for delete from TEHSIL_TBL;
    Explained.
    SQL> @C:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlxpls.sql
    PLAN_TABLE_OUTPUT
    Plan hash value: 3350021484
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | DELETE STATEMENT | | 205 | 1435 | 1 (0)| 00:00:01 |
    | 1 | DELETE | TEHSIL_TBL | | | | |
    | 2 | INDEX FULL SCAN| PK_TEH_ID | 205 | 1435 | 1 (0)| 00:00:01 |
    Please suggest why that query taking so long tome to execute.Please quantify "long time".
    >
    >
    Thanks in Advance...
    AsmitEXPLAIN PLAN shows time of 1 SECOND!
    How must faster should it be?

  • Understanding complex query with selections(customer exit variables)

    Hi experts,
    I am trying to understand one query having  a combination of selections and BEx variables in it.
    In Characteristic Restrictions panel of Query Designer:
    we have some CHARs restricted by means of authorisation variables
    In Default Values panel:
    some other CHARs without any filters
    In free CHARS panel
    some characteristics
    In Rows panel:
    some more chars that were placed in Default values panel
    In Columns panel:
    Formula YTD on selection YTD
    Formula Monthly on selection Monthly
    Selection on YTD characteristic(hidden)
    Selection on Monthly characteristic(hidden)
    Selection XX(in definition,I saw selection on YTD Keyfigure and a characteristic variable VAR1(i-step=1) filled with customer exit..this variable picks up right version of Master Data...our system has many versions of master data,one for each year)
    Selection YY(in definition,I saw selection on Monthly key figure and the same characteristic variable VAR1 we used in Selection XX)
    When I execute this..I see one variable popup which asks for values for year and version of master data...I enter master data version for that year and the year....I see the result...
    Now I tried to experiment to learn...I deleted Selection XX and Selection YY and tried to execute....a variable popup asking for year...I enter year and tried to execute..it throws message---'Value for variable VAR2 cannot be determined'......
    I couldnot understand this error because VAR2 is a customer exit characteristic variable defined in CMOD...ITS NEVER USED IN THIS QUERY...but defined in CMOD to pick up correct version of Master data..its defined in such a way that it picks value depending upon VAR1 varaible....both variables function is same...its just that  VAR1 works on i_step=1 and VAR2 works on i_step=2 plus dependent on VAR1....
    Can anyone understand why I am seeing error about VAR2 when its never used in Query....??
    Thanks for your inputs....

    Hi Vikram,
    I am unable to find VAR2 anywhere in query designer....Can it be like that its hidden?
    Thanks and Rgds,
    SChand

  • Why can I no longer import EDITED photo from my iPad to my Mac using Image Capture from Snapseed app?

    Why can I no longer import EDITED photo from my iPad to my Mac using Image Capture? This is farcical and a real problem having to email them individually to myself and is totally inefficient time wise compared to previously using image capture! Why change this when it was working well and very quickly until the latest change. Now I have to move files from downloads into an appropriate folder, after emailing each individual edited image to myself, then I have to open in Photoshop and rename the file. This is ludicrous and takes forever to do!

    Thank you! I suppected it would be in the settings somewhere. I' ve much to learn...get myself into trouble pushing buttons I don't really understand.

  • Why can I no longer fax from my 7515 printer or from my desktop or laptop?

    Why can I no longer fax from my 7515 printer or from my desktop or laptop?

    Hi @Vickile 
    Welcome to the HP Support Forums.  I understand that you are unable to access the eFax on your Photosmart 7515 printer.
    I have included a link to a post by @PrintApper regarding eFax titled eFax users - please read.  It has the information regarding the eFax feature.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Why can I no longer swipe between photos in iPhoto?

    why can I no longer swipe between photos in iphoto?

    I will request that your query be relocated to the iPhoto forum where knowledgeable iPhoto user will be able to assist you.
    Ciao.

  • Why can I no longer import photos to iphoto library from the internet with a right click?

    Why can i no longer import photos from the internet to my iphoto library with just a right click?

    There are 9 different versions of iPhoto and they run on seven different versions of the Operating System. The tricks and tips for dealing with issues vary from version to version and OS to OS. So before anyone can help, they need information to work with. Basic stuff:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. What were you doing when the problem arose?
    - Did it ever work properly?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    Anything else you can think of that might allow someone else to understand your issue.
    With this kind of information somebody can develop a starting point for troubleshooting the issue.

  • Why LR4.4 no longer works with Blurb?

    Hi,
    why LR4.4 no longer works with Blurb?
    If I configure a book and then click Submit to Blurb does not happen anymore. I even looked at the network traffic and it seems as if the IP is pinged to the contact record no longer respond. I do not understand. This has worked fine all the time. On the computer no setting has been changed. No software is installed that would prevent something. The last book has worked wonderfully. Interesting things, when I export the book as PDF and then upload at Blurb, Blurb complains that the standard by which PDF is not true. X2003 PDF version .... but I am surprised very strong and I really suspect that there adobe wants to put a stop to that one is supposed to buy the new LR version. But everything just a guess. Maybe someone can help me or even has a similar problem.
    greeting
    Mario.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If not successful that means that the IOS update broke compatibility, Since the 3G and 4G iPods has difference hardware, there are some differences in the iOSs for the two model iPod.

  • In the attached VI I dont understand why data from the inner case structures are not being transmitted to the array.

    In the attached VI I don't understand why data from the inner case structures are not being transmitted to the array.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    TEMP.vi ‏25 KB

    It took me some time to figure what you are trying to do but I think I have it now.
    The SR is still required.
    What is happening is your "Bundle By Name" is replacing all of the fields of the cluster, not just the value coming out of the case structure. So to maintain the cluster stuff you do in earlier iterations you can either...
    1) Put the "Index array, Bundle by name, and Replace array" inside the case structure and ONLY bundle the value you are setting in that iteration. (as you will see Tim post shortly)
    OR
    2) Move the Index array before the Case, unbundle all of the fields and feed teh case structure and run them across the case so that ALL of your output tunnels come from the coresponding input tunnel EXCEPT for the filed you are trying to set.
    Ben
    Message Edited by Ben on 05-05-2010 01:31 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • ITunes doesn't read ID3 tags properly on import

    hi all, today I've added ID3 tags to all my mp3 files, so that they will look better in iTunes and my iPod. I have added information for "title", "artist", "album" and "track #" in ID3v1 and ID3v2.3. Now, when I import these files to iTunes, the ID3

  • Lumia 620 motherboard problem

    Hi, My My nokia lumia 620 was spread with rain water, i have drained it. It was working next 2 days and next day suddenly it stopped displaying/booting/getting on.  Gave for Service now they are telling mother board is gone and it cannot be repaired.

  • My mac book air doesn't have iPhoto nor imovies

    hi my mac book doesn't have iphoto nor imovies

  • Dynamic select query for a dynamic table

    Hi Guys, i have a requirement where i have print the rows of a sql table which is passes dynamically. Let me walk you through the details of my requirement i.e for example i have a procedure ABC which will print the rows of the table by taking the ta

  • Hp-setup not connecting to server from China

    Hello all, this is a weird problem: when I am in China I sometimes need to install new HP printers; those printers, like LaserJet M1213nf MFB of today, are fully supported by hplip on Debian, but when I try to run hp-setup it cannoct connect to serve