Incremental loading - select taking a lot of time - urgent please

Hi,
I have a huge source oracle table with millions of records. I am using a last_update_date field from this table to select the new records. I have the last_update_date indexed. Also, please note number of distinct values of this field is not high.
1.
I have the last_update_date of the previous load in another metadata table (in the target system though).
In my mapping, I have the source, I then have a metadata table from where I get the value that is the last_update_date in the prev load.
I have a expression which actually converts this value from the metadata table to date field using TO_DATE(...). I have a filter which has inputs from this expression and the fields that I require from the source table. I then use te filter condition as INOUTGRP1.LAST_UPDATE_DATE(from source) > INOUTGRP1.LAST_LOADED_DATE (from metedata). This does not use the index becasue it takes a lot of time to load (approx 30 mins for 10k new records).
2.
Just to test I hard coded the LAST_LOADED_DATE in the filter condition like
INOUTGRP1.LAST_UPDATE_DATE(from source) > TO_DATE('03/15/2007 05:30:00 PM', 'MM/DD/YYYY HF:MI:SS PM'). This uses the index and takes about 15 seconds to load the same 10k records.
I cant hard-code the date because this will keep changing as I load.
Any suggestions please.
Thanks a lot in advance!
Maruthi

Hi
I had exact performance issus as your before. Here is my solution.
1. create a function like this:
d_edw_run_date date;
-- main body
BEGIN
select edw_run_date
into d_edw_run_date
from estg_mrif.loading_date;
RETURN d_edw_run_date;
EXCEPTION
WHEN OTHERS THEN
NULL; -- enter any exception code here
RETURN NULL;
END;
you can add your to_date function in the select statement. Let's name this one as GET_EDW_RUN_DATE.
2. Call this function in each of your mapping as a Pre_Mapping operator.
3. Drag all of your source plus the VALUE of this Function (in Pre_Mapping) to a filter. Add the filter condition as INOUTGRP1.LAST_UPDATE_DATE(from source) > INOUTGRP1.VALUE.
You'll be satisfied with the performance now because the returned value from the function will be used as a Constant Value in your generated SELECT and surely your index will be used.
As you didn't mention what your DB version is, you can have an additional fix it if this one doesn't work very well. For example change the condition "> " to "Between <the start date> and <A constant date>" .
Hope this will work for you.
Regards,
Jenny

Similar Messages

  • Simple select query is taking a lot of time

    hi gems...
    my table has 7267563 rows...and i am doing a simple select * from table;
    but it is taking a lot of time nearly 25minutes but not completed...
    when i did select count(1) from table then it gave the result instantly also select * from table where rownum < 10 is also fine...even when i am selecting all the records using rownum i.e. select * from table where rownum < 7267563 is also giving result instantly...
    but the entire table is not getting result i.e. select * from table...also there is no lock in the table(though i know that select is nothing to do with lock)..
    what may be the issue..please suggest...thanks in advance...
    Edited by: user12780416 on Dec 12, 2011 11:08 PM

    Hi;
    Please see below thread
    query takes too long ...
    help in solving long run query
    HOW TO: Post a SQL statement tuning request - template posting
    Hope it helps
    Regard
    Helios

  • Select Command taking a lot of time to execute

    Dear Experts,
    My below SELECT command taking a lot of time to execute.
          SELECT wid
                       matl_desc
                       INTO TABLE open_wid FROM zwb_table
                       WHERE ( weight2 = 0 OR weight2 IS NULL ).
    Table : zwb_table contains around 7 Lacs records. That's why taking a lot of time . I have also Indexed the table zwb_table with field WID & WEIGHT2 . (zwb_table contains only WID as Primary Key Field)
    Structure of Internal Table : open_wid ->
                                             wid LIKE zwb_table-wid,
                                             matl_desc LIKE zwb_table-matl_desc,
    Please suggest me how to Improve the Performance of the above Select command.
    Thanks in Advance
    JACK

    Hi Jack,
    you are having morethan 7lack records in z table. it is not good practice fetching all the records into internal table and restricting with where clause in loop statement.
    I hope you already created secondary index combination of primary key.
    check you select query fetching records based on index you have created in ST05.
    Refer below link for your program is using index that you have created.
    Re: Indexing
    Regards,
    Peranandam
    Edited by: peranandam chinnathambi on Apr 7, 2009 8:38 AM

  • Mac taking a lot more time

    My Mac is taking a lot more time to load photos from iPhone and iPad than was taking before.What can be the reason of it ?
    Thanks

    DO NOT INSTALL MACKEEPER or any other so called 'cleaning ' application.  Please read the following user tip:
    https://discussions.apple.com/docs/DOC-3036
    Look for reasons in this user tip for your issues of slow operation:
    https://discussions.apple.com/docs/DOC-3521
    Ciao.

  • Can we optimize the query  :  It is taking a lot of time

    the following query is taking a lot of time ...
    Can anyone suggest to make it run faster ???
    table B has 12 million records
    table a has 10000 records
    CREATE TABLE less_time
         PARALLEL
         NOLOGGING
         AS
         SELECT a.user_id,a.mp_id, COUNT(product_id) product _count
         FROM table a,table b
         WHERE TRUNC(a.call_time) < TRUNC(SYSDATE) - 1
         AND a.history_id = b.call_id
         AND b.product_type = 1
         AND b..product_status= 50
         AND user_id IS NOT NULL
         GROUP BY user_id,mp_id;

    analyze index indx_mtx compute statistics
    thanks for explaining David ...
    Actually I somewhat bettered it
    i made a consolidated index on table b
    like create index indx_ty on table b (call_id,mp_id,user_id,b.product_type,product_status)
    now the explain plan shows that the query is much much faster also i did one trick in the query
    SELECT a.user_id,a.mp_id, COUNT(product_id) product _count
    i changed to SELECT a.user_id,a.mp_id, COUNT(1) product _count
    to enable it to do FFS
    thanks anyways ....

  • Generic Extraction : Taking a lot of time

    HI Experts
    I have created ZKONV a generic extracter which is a copy of KONV table. It has around 16,00,000 records .When I´m pulling the data in to ODS it is taking a lot of time. it is taking around 5+ hours to load the data. Is there anything wrong with my Datasource why it is taking so much of time.
    Kindly provide some inputs
    Thanks
    NLN

    Hi Lakshminarayana
    You got to check couple of things.
    First goto the source system and see, how long the extract program is running. The long time may be due to poor source system performance or huge processing at the BW system side. If the job in the source system is running for a long time, then check the source system resource. Build proper index on the mentioned table and see whether it has improved the performance. You can ask the basis people for the SQL trace and they let u know what kindof indexes u can build on the tables.
    If the processing is taking more time, then u have to imrpove the start/update routine in the BW side. Please let us know, where exactly u have the problem. Then we can think of resolving it.
    Sriram

  • Startup taking a LOT of Time

    Hi All,
    We have our application on Weblogic Server 8.1 SP5 and its taking a lot of time while starting up.
    What I found that these lines are the ones which are taking up majority of the time.
    Kindly Suggest how we can improve on this.
    ####<Jun 15, 2009 4:14:59 PM GMT+05:30> <Info> <Deployer> <sunbom4> <cgServer> <main> <<WLS Kernel>> <> <BEA-149060> <Module uddi of application uddi successfully transitioned from unprepared to prepared on server cgServer.>
    This line took more than 2 min.
    ####<Jun 15, 2009 4:16:50 PM GMT+05:30> <Info> <Deployer> <sunbom4> <cgServer> <main> <<WLS Kernel>> <> <BEA-149060> <Module MLAppCoreWL610.jar of application IntellectMM successfully transitioned from unprepared to prepared on server cgServer.>
    ####<Jun 15, 2009 4:18:23 PM GMT+05:30> <Info> <Deployer> <sunbom4> <cgServer> <main> <<WLS Kernel>> <> <BEA-149060> <Module OpenFXWrapperEJB.jar of application IntellectMM successfully transitioned from unprepared to prepared on server cgServer.>
    The above 2 lines are taking 1.5min each.

    I suggest that you take some thread dumps 10-15 secs apart during the time it's slow. The log timing alone won't tell you where the threads are spending time.

  • My Ideapad N581 is taking a lot of time to start up ....Can experts help?

    My laptop is taking a lot of time to start up.It just shows the Lenovo screen and stops there.What could be the problem?
    Thanksin advance.

    hi mamuninayak,
    The system might be experiencing a boot or a POST issue.
    - Remove all USB devices.
    - Remove the AC adapter and battery then held down the power button for 15 sec.
               Reconnect just the AC and try.
    -See if BIOS can be reset.
             Start hiting F2 when while powering the system on.
                     If succesfull in booting into BIOS. Hit F9 the F10
    Try Removing the Harddrive and turn the system on, See if there will be any changes.
    Hope this helps
    Cheers!
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • My iPad is taking a lot of time to factory reset..What should I do?

    Hello,
                  I am currently factory resetting my iPad , but i forgot to do it using my pc , so I did it without using iTunes , I did it using the option in the iPad's settings but it is taking a lot of time , so far it has been 2 hours ... What should I do if it takes more than 5 hours or so?
                                                                                         Thanks in advance,

    hi mamuninayak,
    The system might be experiencing a boot or a POST issue.
    - Remove all USB devices.
    - Remove the AC adapter and battery then held down the power button for 15 sec.
               Reconnect just the AC and try.
    -See if BIOS can be reset.
             Start hiting F2 when while powering the system on.
                     If succesfull in booting into BIOS. Hit F9 the F10
    Try Removing the Harddrive and turn the system on, See if there will be any changes.
    Hope this helps
    Cheers!
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Background task taking a lot of time to execute

    Hi,
    There is a background task in my workflow which is taking a lot of time to execute.
    I have tested it in dialog mode.. and it works fine.. takes just 2 mins.
    Only when the task is executed from background.. it takes about 10 mins.
    Is this a config problem? How do I check if it is so?

    you could try activating a trace (sql) and see what the differences are,.
    you could check if maybe user parameters are influencing this. Or ask your basis team if there are a lot of differences between syystem users and dialog users in terms of resource allocation.
    Did you find anything different whilst debugging it?
    Kind regards, Rob Dielemans

  • Hello i have a problem that i was making update IOS7 for my i phone 5 it's taking a lot of time about 4 hours till now, i can't use my phone know, it's appere logo i tunes only, can't do eny thing else like shutdown

    Hello i have a problem that i was making update IOS7 for my i phone 5 it's taking a lot of time about 4 hours till now, i can't use my phone know, it's appere logo i tunes only, can't do eny thing else like shutdown

    Hey Andrew keriakous,
    Thanks for the question. It sounds like your iPhone may be in recovery-mode. To resolve this issue, see the following:
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Thanks,
    Matt M.

  • My ipod was disabled and i tried to restore it, now i am downloading an apple software update which is taking a **** lot of time and ipod is still disabled.. will it be ok after the download ends? help please..!!

    my ipod was disabled and i tried to restore it, now i am downloading an apple software update which is taking a **** lot of time and ipod is still disabled.. will it be ok after the download ends? help please..!!

    We need to know more about your system, please download EtreCheck and run the report and please post it on your next reply. Then we can see how your system is configured, what apps are on it and look for anything obvious. We will look forward to seeing your report.

  • Expdp is taking a lot of time

    hi,
    I have a small schema in a database housing lots of users.
    The expdp is taking a lot of time for this schema eventhough the old exp takes 1/10 th time.
    When i switched on the trace i see its stuck at below on <SID>dw0115741.trc trace file
    KUPW: 03:40:41.551: 1: DBMS_LOB.TRIM returned
    KUPW: 03:40:41.551: 1: DBMS_METADATA.FETCH_XML_CLOB called
    its stuck at
    Starting "USER"."USER_JOB": USER/******** dumpfile=USER.dp logfile=USER.log job_name=USER_job parallel=4 exclude=grant,index,trigger,constraint,statistics,index_statistics trace=1FF0300 directory=EXPDP_BKP
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    I have replaces the actual username with USER
    sga_target 2147483648
    sga_max_size 2634022912
    streams_pool_size 0
    Does any one has any suggestion?
    I tried the metalink as well but didnt find anything useful
    Thanks
    Shipra

    Pl post details of OS and database versions
    Pl see is MOS Doc 453895.1 (Checklist for Slow Performance of Export Data Pump (expdp) and Import DataPump (impdp)) - "Defects 10/11" - can help
    HTH
    Srini

  • Concurrent request is taking a lots of time to run

    Hi,
    I have one query regarding ICM.
    one of the concurrent request is taking a lots of time to run. How can I solve the issue.
    Is there any steps to diagnose this issue?
    Please reply.
    Regards,
    Manish

    Hi,
    How we can find that particular request are taking long time?See your other thread.
    Concurrent request taking long time
    Concurrent request taking long time
    what is "gather statistrics schema" concurent program and what it does?See (Note: 419728.1 - How To Gather Statistics On Oracle Applications 11.5.10(and above) - Concurrent Process,Temp Tables, Manually).
    Regards,
    Hussein

  • Variable Selection option takes lot of time

    Hi All,
    One of my variable for the info object "0GL_Account" is taking lot of time while displaying the list for selection options (almost 12-13 mins for 950 records). I tried bmany changes in the info object properties.....but in vain........moreover, many other variables with equal no. of records are all performing properly. Please suggest the remedy...

    Hi,
    It depends how are you reading your InfoObject master data in the query.
    You can read the values that exist in the InfoProvider, or you can read the values that exist in the master data of the InfoObject.
    Both options take different time in reading the values.
    You can try both options in transaction rsd1 tab Business Explorer in the option "Query Execution Filter Val. Selectn".
    Diogo.

Maybe you are looking for

  • Redeploying an EJB onto OAS 4.0.8.3 from JDev 3.1 - problem

    I'm trying to redeploy an EJB onto the OAS, and I get the following error: java.io.FileNotFoundException: D:\OraHome1\ows\4.0\..\apps\ejb\ChartBean\_client.jar (The requested operation cannot be performed on a file with a user mapped section open) at

  • Project code  wise aging

    dear   expert all parameter    from date  to to date , project code   one of my client requriment  i have  need   project  code wise  aging report . send  me the query.

  • IPhoto not found after OS reinstall and upgrade

    I just bought a used Mac Mini to give to my in-laws. I used the original boot disks to reinstall the software. I then upgraded to Leopard. When all was said and done, evereything was wonderful except that iPhoto was nowhere to be found. Going back to

  • Errorhandling in SAP XI

    Hi, We want to send a message to SAP XI and if the mapping ends with an error, our software "clix", which is connected to XI with  a jms-provider, should get a message in a dialog box. Is this possible to develop such an error handling in SAP XI? Tha

  • Creating Business Components from Teradata tables

    I'm trying to use the "business components from tables" wizard using a connection to a Teradata database. The business components get created without attributes. I'm getting an error where JDeveloper thinks that the Teradata table doesn't have a prim