Query on batch jobs with overlapping time during execution time

Dear experts,
This post is related to a task in SAP SCM EM module and currently I am working on an archival activity that comprises of two tasks to be done through 2 different programs (scheduled through batch jobs)
Job 1 is created to deactivate particular Event Handler records (changing a status field on the EH record)
Job 2 (archival job) runs daily and writes deactivated EHs to a local file and subsequently deletes this from SAP server.
Archival job takes an average of 30 hrs to complete .
Therefore my query is on how to schedule Job1, as these seem to be dependent and might impact each other in unexpected manner.
Please advise.
Thanks & regards,
Mohan

Hi Mohan,
You can try as Daniel suggested. Delay Archieving job or can run after deactivating Event Handler records job is finished. Check any parallel processing is available or not.
It can stop your overlapping issue and can increase your performance.
Thanks,
Bala.

Similar Messages

  • Schedule job with JOB_CLOSE until a certain time

    Hello all,
    I'd like to schedule a background job with JOB_CLOSE until a certain time, i.e. first start time at 10 a.m., repitition period 15 min., last start time 1 p.m.
    I tried this using parameter LASTSTRTTM, e.g.:
    i_startdate = sy-datum.
    i_starttime = '100000'.
    i_prdmins = '15'.
    i_laststrtdt = sy-datum.
    i_laststrttm = '130000'.
    CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = l_jobcount
          jobname              = 'MY_JOB'
          sdlstrtdt            = i_startdate
          sdlstrttm            = i_starttime
          laststrtdt           = i_laststrtdt
          laststrttm           = i_laststrttm
          prdmins              = i_prdmins
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          OTHERS               = 8.
    but I didn't succeed - the job didn't stop at 1 p.m. Any hints?
    Best regards
    Martin Lehmann

    Hi Martin,
    i_startdate = sy-datum.  " 1st time Job Start Date
    i_starttime = '100000'.
    i_prdmins = '15'.
    i_laststrtdt = sy-datum.  " If Job is not started by this date, then it wont be started once this date is completed
    i_laststrttm = '130000'.
    What it means is, if i want to start a job by 10th Oct.. & expect that it should be started maximum by 20th Oct.. If its 20th Oct & still the job is not started,... then terminate the job & do not start it..
    If the job is already started, then it wont stop.
    Hope its clear.
    Best regards,
    Prashant

  • Batch job with 2 conditions

    Hi,
    We have a program that will create a batch job and then we need to go to SM35 to run that batch job manually. We want to avoid this manual step and what we want to do is to as soon as our program runs it will create a batch job and then batch job should kick off automatically.
    One of the solution that came to my mind is to schedule a batch job with two conditions:
    1. in first condition it will run our main program
    2. and in 2nd step it will look out for the batch job that created in SM35 and will kick off that, but I am not sure how can i do this using Sm36.
    I was also wondering if there is another way so that we can just avoid the batch run for the second step?
    So can you please help me with this.
    Thanks,
    Rajeev

    SM35 -> batch sessions, so I assume you are talking about these.
    You can start sessions under program control by submitting program RSBDCSUB after creation of the session.
    Thomas

  • Batch job with user name

    Hi,
    Is it possible to create a batch job with another user name using JOB_OPEN?
    and what is the use of JOB_GROUP option??
    Thx in advance.
    PRa

    use:
    CALL FUNCTION 'JOB_OPEN'...
    *--create Step
        SUBMIT RFBIBL00 AND RETURN
               USER SY-UNAME VIA JOB JOBNAME NUMBER JOBCOUNT
               WITH DS_NAME = FILE
               WITH CALLMODE = 'B'.
    greetings

  • Same sqlID with different  execution plan  and  Elapsed Time (s), Executions time

    Hello All,
    The AWR reports for two days  with same sqlID with different  execution plan  and  Elapsed Time (s), Executions time please help me to find out what is  reason for this change.
    Please find the below detail 17th  day my process are very slow as compare to 18th
    17th Oct                                                                                                          18th Oct
    221,808,602
    21
    2tc2d3u52rppt
    213,170,100
    72,495,618
    9c8wqzz7kyf37
    209,239,059
    71,477,888
    9c8wqzz7kyf37
    139,331,777
    1
    7b0kzmf0pfpzn
    144,813,295
    1
    0cqc3bxxd1yqy
    102,045,818
    1
    8vp1ap3af0ma5
    128,892,787
    16,673,829
    84cqfur5na6fg
    89,485,065
    1
    5kk8nd3uzkw13
    127,467,250
    16,642,939
    1uz87xssm312g
    67,520,695
    8,058,820
    a9n705a9gfb71
    104,490,582
    12,443,376
    a9n705a9gfb71
    62,627,205
    1
    ctwjy8cs6vng2
    101,677,382
    15,147,771
    3p8q3q0scmr2k
    57,965,892
    268,353
    akp7vwtyfmuas
    98,000,414
    1
    0ybdwg85v9v6m
    57,519,802
    53
    1kn9bv63xvjtc
    87,293,909
    1
    5kk8nd3uzkw13
    52,690,398
    0
    9btkg0axsk114
    77,786,274
    74
    1kn9bv63xvjtc
    34,767,882
    1,003
    bdgma0tn8ajz9
    Not only queries are different but also the number of blocks read by top 10 queries are much higher on 17th than 18th.
    The other big difference is the average read time on two days
    Tablespace IO Stats
    17th Oct
    Tablespace
    Reads
    Av Reads/s
    Av Rd(ms)
    Av Blks/Rd
    Writes
    Av Writes/s
    Buffer Waits
    Av Buf Wt(ms)
    INDUS_TRN_DATA01
    947,766
    59
    4.24
    4.86
    185,084
    11
    2,887
    6.42
    UNDOTBS2
    517,609
    32
    4.27
    1.00
    112,070
    7
    108
    11.85
    INDUS_MST_DATA01
    288,994
    18
    8.63
    8.38
    52,541
    3
    23,490
    7.45
    INDUS_TRN_INDX01
    223,581
    14
    11.50
    2.03
    59,882
    4
    533
    4.26
    TEMP
    198,936
    12
    2.77
    17.88
    11,179
    1
    732
    2.13
    INDUS_LOG_DATA01
    45,838
    3
    4.81
    14.36
    348
    0
    1
    0.00
    INDUS_TMP_DATA01
    44,020
    3
    4.41
    16.55
    244
    0
    1,587
    4.79
    SYSAUX
    19,373
    1
    19.81
    1.05
    14,489
    1
    0
    0.00
    INDUS_LOG_INDX01
    17,559
    1
    4.75
    1.96
    2,837
    0
    2
    0.00
    SYSTEM
    7,881
    0
    12.15
    1.04
    1,361
    0
    109
    7.71
    INDUS_TMP_INDX01
    1,873
    0
    11.48
    13.62
    231
    0
    0
    0.00
    INDUS_MST_INDX01
    256
    0
    13.09
    1.04
    194
    0
    2
    10.00
    UNDOTBS1
    70
    0
    1.86
    1.00
    60
    0
    0
    0.00
    STG_DATA01
    63
    0
    1.27
    1.00
    60
    0
    0
    0.00
    USERS
    63
    0
    0.32
    1.00
    60
    0
    0
    0.00
    INDUS_LOB_DATA01
    62
    0
    0.32
    1.00
    60
    0
    0
    0.00
    TS_AUDIT
    62
    0
    0.48
    1.00
    60
    0
    0
    0.00
    18th Oct
    Tablespace
    Reads
    Av Reads/s
    Av Rd(ms)
    Av Blks/Rd
    Writes
    Av Writes/s
    Buffer Waits
    Av Buf Wt(ms)
    INDUS_TRN_DATA01
    980,283
    91
    1.40
    4.74

    The AWR reports for two days  with same sqlID with different  execution plan  and  Elapsed Time (s), Executions time please help me to find out what is  reason for this change.
    Please find the below detail 17th  day my process are very slow as compare to 18th
    You wrote with different  execution plan, I  think, you saw plans. It is very difficult, you get old plan.
    I think Execution plans is not changed in  different days, if you not added index  or ...
    What say ADDM report about this script?
    As you know, It is normally, different Elapsed Time for same statement in different  day.
    It is depend your database workload.
    It think you must use SQL Access and SQl Tuning advisor for this script.
    You can get solution for slow running problem.
    Regards
    Mahir M. Quluzade

  • SQL to find queries with execution time, total execution time so far,

    Hello Sir,
    We are looking for a query to find queries taking more than 6 seconds to execute, no of its executions so far, average execution time, total execution time so far.Thanks in advance.
    -Mal

    Something like this.
    SELECT s.SID, s.serial#, t.sql_fulltext,t.sql_id,s.action FROM v$session s, v$sql t
        WHERE s.status = 'ACTIVE'
          AND s.sql_address = t.address
          AND s.sql_hash_value = t.hash_value
          AND s.last_call_et >6HTH
    -Anantha

  • Creating batch job with 5 classes

    Hi All,
    I have a requirement in which I have to do five different operations at different time instances.
    1.Generate a report at morning 11.00 AM.
    2.update a table with more than 6000 rows at night 12.30 AM
    3.Generate a second report querying from the database at 10.00 AM Everyday.
    4.Generate an automail at 11.30 Am Everyday
    All these are plain Java classes and not web components. How could I effectively design the batch job so that it doesnot take nmuch memory and design classes so that they must be reusable like DB connection,Getting a db field value frequently etc.
    Can any one help me on this.

    http://www.google.com/search?q=job+schedule+in+java&client=netscape-pp&rls=com.netscape:en-US

  • Sftp batch job with password?

    Hi folks.
    We're trying to develop scripts to automate the transfer of files from various Windows machines to a Linux server.  Because the job involves moving multiple files to multiple directories, I wanted to use sftp's -B batchfile option to transfer the files instead of having to reauthenticate every time we transfer files to a different location.  However, the man page says:
    Batch mode. Reads commands from a file instead of standard input. Since this mode is intended for scripts, SFTP2 will not try to interact with the user, which means that only passwordless authentication methods will work.
    I would love to use keys to get this done but unfortunately, the type of authentication on the server is out of our control and not likely to change (it's straight password).  So, is there any way I can do this in batch mode with password authentication?  I thought about using scp but, as far as I can tell, it doesn't have great support for delivering multiple local files (in different locations) to multiple remote locations.  One would have to re-authenticate for every scp command, right?
    Any help would be appreciated.  Thanks.

    Thanks for the recommendation, Endperform, but after reading up on expect and autoexpect, I realized I'd rather not have usernames and passwords hard coded into the script.
    After much research, I think I've found a solution.  It's a little odd but the Maverick Ant library does exactly what I need it to do.  It can actually read an ssh profile, perform multiple transfers without having to re-authenticate and execute multiple remote commands without having to reauthenticate.  The native Ant libraries can't do this.  There is no sftp Ant task and the scp and sshexec tasks are lacking to say the least.
    If anyone else runs into a similar situation, I highly recommend the Maverick tool.

  • Job with Multiple Schedule of same time & only one is executed, Why

    Hi ALL,
    I've Created a package to notify report in email  as excel, which is using a path to render report and save it as excel.
    This package was need to be schedule every first day of month and on every Friday even at morning 7 AM.
    So logically these are two events.
    But if we see on 1 May 2015 we have Friday and plus first day of month
    So technically this should fail.
    either for IO operation for render &
    storing data over same location with same file name.
    To replicate this i created two three schedule
    Below is the job history, job is invoked by only one schedule
    Question-
    1) Why one one schedule execute?
    2) why "sched2" only , it could be "sched3" only or "DentalOperationStackAndRank-Sched1" Only?
    Another this i result into error if different job executing same package at same schedule.
    FYI- package is deployed at database level
    HS

    Hi HS,
    As described in this
    article, more than one job can run on the same schedule, and more than one schedule can apply to the same job.
    And I make a test about your scenario, when configuring a SQL Server job with three schedules that reference same dates and times, my job behaves as yours that only one schedule is executed, but the job is invoked by schedule2 or schedule 3 in my environment.
    It is a normal behavior of SQL Server job in my opinion. For more details about such scenario, you can track the job following this
    blog.
    However, when I configure three jobs that run on the same schedule, everything works well and the three jobs all run successfully.
     I recommend you configure three different jobs that execute same package at same schedule .
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • How to Schedule Jobs to only run during a time window

    I have a long running task that needs to schedule jobs to process data.
    I only want these scheduled jobs to start during a specific window of time each day, probably 10:00 PM to 6:00 AM.
    If the scheduled jobs do not begin during the specified time frame, they must wait until the next day to start running.
    Each scheduled job will only be executed once and then auto dropped.
    How should I go about creating these scheduled jobs?

    Hi Jeff,
    I agree that the documentation isn't clear enough about the purpose of windows.
    You can indeed use windows for changing the resource plan, but you can also use them for scheduling your jobs.
    I did a simple test in real-time to illustrate the latter.
    At around 10.30 am today I created a table that will populated by a job:
    CREATE TABLE TEST_WINDOW_TABLE(EVENT_DATE DATE);
    Then, I created a window whose start_date is today at 10.40 am :
    dbms_scheduler.create_window(
                                 window_name     =>'TEST_WINDOW',
                                 resource_plan   => NULL,
                                 start_date      => to_date('10/04/2014 10:40:00', 'dd/mm/yyyy hh24:mi:ss'),
                                 repeat_interval => NULL,
                                 duration        =>interval '5' minute
    You can see that this window doesn't have a resource plan, and its repeat interval is NULL (so it will be opened only once).
    The window will stay open for 5 minutes.
    Finally, I created a one-off job whose schedule is the previously created window:
    DBMS_SCHEDULER.create_job (
                               job_name      => 'TEST_WINDOW_JOB',
                               job_type      => 'PLSQL_BLOCK',
                               job_action    => 'BEGIN insert into test_window_table values (sysdate); COMMIT; END;',
                               schedule_name => 'SYS.TEST_WINDOW',
                               enabled       => true,
                               auto_drop     => true
    Checking the user_scheduler_job_log before 10.40 would return no rows, which mean the job hasn't started yet since the window was not open.
    Now, from 10.40, it shows one entry:
    SQL> select log_date, status from user_scheduler_job_log where job_name = 'TEST_WINDOW_JOB';
    LOG_DATE                                                                         STATUS
    10/04/14 10:40:02,106000 +02:00                                                  SUCCEEDED
    The TEST_WINDOW_TABLE has also got the row:
    SQL> select * from TEST_WINDOW_TABLE;
    EVENT_DATE
    10/04/2014 10:40:02
    Voilà.
    In your case, since you want to run the jobs daily between 10 pm and 6 am (duration of 8 hours), the window would look like this:
    dbms_scheduler.create_window(
                                 window_name     =>'YOUR_WINDOW',
                                 resource_plan   => NULL,
                                 repeat_interval => 'freq=daily;byhour=22;byminute=0;bysecond=0',
                                 duration        =>interval '8' hour
    For your jobs, you may need to specify an end_date if you want to make sure the job gets dropped if it couldn't run in its window.

  • Parsing each time during execution

    Hi All,
    I am just wondering why my sqls are parsed each time upon execution.
    DB version :
    select *From v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - ProductionI could see from TKPROF report that for each execution, i have one parse. This is for all sqls/dmls under this tkprof.
    I have cursor_sharing set to EXACT and session_cached_cursors=50 (may be this is too low).
    shared_pool_size=512 MB
    cursor_space_for_time=FALSE
    I have java application.
    Is there any way i can have 1 time parse across multiple execution ?
    SQL ID: cc5qh5gvfysby Plan Hash: 1237311609
    SELECT BALANCE_CONTROL_VERSION,MATCH_SET_CLOSED_DATE,MATCH_KEY_ID,
      MATCH_SET_TYPE_ID,OPEN_BALANCE_UNIT,OPEN_BALANCE_VALUE,
      MATCH_SET_OPENED_DATE,RECORD_VERSION_NUMBER,MATCH_SET_STATE,
      TOTAL_BALANCE_UNIT,TOTAL_BALANCE_VALUE
    FROM
    MATCH_SETS WHERE MATCH_SET_ID=:1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse     1555      0.08       0.06          0          0          0           0
    Execute   1555      0.11       0.10          0          0          0           0
    Fetch     1555      0.07       0.07          0       4710          0        1555
    total     4665      0.28       0.24          0       4710          0        1555
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 81 
    Number of plan statistics captured: 3
    SQL ID: gdy8k5wksn2zd Plan Hash: 0
    INSERT INTO MATCH_SETS ( MATCH_SET_ID,BALANCE_CONTROL_VERSION,
      MATCH_SET_CLOSED_DATE,MATCH_KEY_ID,MATCH_SET_TYPE_ID,OPEN_BALANCE_UNIT,
      OPEN_BALANCE_VALUE,MATCH_SET_OPENED_DATE,MATCH_SET_STATE,TOTAL_BALANCE_UNIT,
      TOTAL_BALANCE_VALUE )
    VALUES
    (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      523      0.01       0.02          0          0          0           0
    Execute    523      0.38       0.50         58        920       6764         523
    Fetch        0      0.00       0.00          0          0          0           0
    total     1046      0.40       0.52         58        920       6764         523
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 81 
    Number of plan statistics captured: 3

    Hi,
    I don't see parsing problem in your post.
    The select statement has 1555 parses out of which 1 missed in library cache.
    The insert statement has 523 parses with 1 library cache miss.
    What you really want to check is the "soft parse" and "hard parse" statistics for your session.
    An idea to check that is to enable AUTOTRACE in SQL*Plus and execute the select statement over there and check the statistics.
    Good luck.

  • Launch batch job thru SOAP call : no execution, connection OK.

    Hello,
    I am experiencing some problems launching batch jobs thru Web Services. I have added batch job "EPN_Test_Webservices" to the Web Services and enabled the Job Attributes.
    When I try to launch the job thru a SOAP call, I get a reply but the job is not executed.
    This is the SOAP envelope:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <SOAP-ENV:Body>
              <m:EPN_Test_Webservices_Job xmlns:m="http://www.businessobjects.com/DataIntegrator/ServerX.xsd">
                   <job_parameters>
                        <job_system_profile>String</job_system_profile>
                        <sampling_rate>10</sampling_rate>
                        <auditing>true</auditing>
                        <recovery>true</recovery>
                        <job_server>JS_ict</job_server>
                        <trace>String</trace>
                   </job_parameters>
              </m:EPN_Test_Webservices_Job>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    This is the reply I get:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <soapenv:Body>
              <BatchJobResponse>
                   <pid>3888</pid>
                   <cid>13</cid>
              </BatchJobResponse>
         </soapenv:Body>
    </soapenv:Envelope>
    When I use the "ping" operation I get the following reply:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <soapenv:Body>
              <pingVersion>
                   <version>Business Objects Data Integrator Version 11.7.2.0</version>
              </pingVersion>
         </soapenv:Body>
    </soapenv:Envelope>
    ...which indicates the connection works. Also the "processed counter" increases, but the job does not get executed. There is nothing in the  job log, there is no result (the job is supposed to write a record in a database table). What can be wrong?

    If I run the following (on the machine I'm trying to set up the share)
    smbclient -L localhost -U%
    I got the following output
    Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)
    so I thought it might be something incorrect with the iptables side of things, however I haven't really touched that at all and it seems to look correct
    iptables -nvL
    Chain INPUT (policy ACCEPT 667 packets, 79977 bytes)
    pkts bytes target prot opt in out source destination
    Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts bytes target prot opt in out source destination
    Chain OUTPUT (policy ACCEPT 157 packets, 20724 bytes)
    pkts bytes target prot opt in out source destination
    So from my (very little) knowledge this appears correct (I think)... However it appears that something is blocking access somewhere.

  • Execution of Coded UI scripts with least possible test execution time in Windows7 Operating system using Visual Studio Test Agent 2010 without VS2010 installed

    Hi All,
    We are trying to execute coded UI scripts without Visual Studio installed. We are using “Visual Studio Test Agent 2010” for executing coded UI scripts without VS2010 in Windows 7, it is working fine. Also we verified executing the same script with VS2010
    Premium, it works fine as well.
    Here the challenge we are facing is with the Test execution time.
    When we run the coded UI script with IE11-Windows 7 OS-Visual Studio 2010 Premium it takes
    3min 36sec to complete the execution whereas with IE11-Windows 7 OS-Visual Studio Test Agent 2010  it takes
    6min 40sec for the same script to execute (which is almost double the time it takes while executing using VS2010).
    My question is what may be the reason for this difference? and how we can reduce the test execution time when running from Test Agent 2010?
    Kindly let us know what is the best practice to execute the coded UI scripts with least test execution time in Windows 7 Operating system using Visual Studio Test Agent 2010 without VS2010
    installed.
    Looking forward for your positive response.
    Thanks in advance..!!

    Tina-Shi, Thanks for the information.
    As you mentioned, we tried to execute the coded UI test using Mstest.exe in command on VS2010 Premium and checked on the execution
    time, there was a slight difference.
    Please find below execution time.
    Using Mstest.exe in command on VS2010 Premium/Win7 – 3.47 minutes
    Using VS2010 Premium/Win7 – 3.53 minutes
    Using Test Agent/Win7 – 7.3 minutes
    Also, I closed all the other processes in Task manager before starting up the execution.
    Still , I am facing the same Issue. Could you please suggest any other way to reduce the scripting time of coded UI script execution
    through Test agent 2010.
    Looking forward for your earliest response.

  • Batch jobs with status "active" but aren't really active

    We have 4 jobs that show up in SM37 with a status of "active", but they aren't really active.
    They are from 1998, and the client & server listed no longer exist. The PIDs listed do not exist on any servers.
    We have tried to cancel, delete, check status, nothing works.
    Is there some way to get rid of these jobs from the system?
    RSBTCDEL / RSBTCDEL2 will not work, because the jobs are active.
    Thank you.

    When I try to cancel the "active" job, I get message "Error occured determining batch work process information" (Message BT241).
    When I do a Check Status, it just says "1 jobs were checked and 0 jobs were corrected"
    When I try to delete, it says "Job xxxx is active. The selected function cannot be performed"
    We have jobs SAP_REORG_JOBS and SAP_REORG_JOBSTATISTIC running. I cannot find a standard job SAP_REORG_JOBSSTATUS mentioned in Yves reply. If this existst, can you tell me what program is being executed by the job?
    We shut down / restarted one of the systems that has some of the old jobs yesterday, and the problem still exists.
    We are at Basis release 702, SP 12.
    I will take a look at the BP_JOB* function modules

  • Advise on sql query for batch job

    Hi all,
    I'm planning to perform a batch query for 4000 records.
    The query is as follows and we will loop it for 4000 times.
    select w.idno, w.place, e.user_arrival_dt from main.tbl_user w, main.tbl_job e
    where w.idno = e.idno and w.idno = <idno>
    I find that rather inefficient in term of performance.
    I can use the below too but the the in clause has a limit.
    select w.idno, w.place, e.user_arrival_dt from main.tbl_user w, main.tbl_job e
    where w.idno = e.idno and w.idno in <idno1, idno2, idno3, idno4, etc>
    Another way that I can think of is to loop for 10 times and use this query
    select w.idno, w.place, e.user_arrival_dt from main.tbl_user w, main.tbl_job e
    where w.idno = e.idno and w.idno in <idno1, idno2, idno3, idno4, until idno400>
    is there any other more efficient way of coding to achive the above?
    kindly advise.
    thanks!

    Hi,
    Qwerty and Surachart are right; the best way is to put the 4000 values into 4000 rows of a table (perhaps a Global Temporary Table) and use a sub-query.
    If you really must have 4000 literals, then you can have 4000 items in a list like this:
    where      w.idno      = e.idno
    and      (w.idno, 0) IN     ( (idno1,    0)
                   , (idno2,    0)
                   , (idno3,    0)
                   , (idno4000, 0)     
                   )See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=3508573&#3508573] for discussion.

Maybe you are looking for

  • SDHC card does nor work on Satellite A200-1J0 with a clean Vista install

    Greetings, When I bought this notebook there was preinstalled Vista 32bit and as usual some Toshiba's drivers and software. As I remeber there was no problems with built in memory card reader, it was reading regular SD cards and also SDHC. One day I

  • How to load a partial hierarchy

    EPM 10 NW While loading 0GL_ACCOUNT not all master data in BW is relevant for my planning in BPC hence i need to load only one branch of the hierarchy. As far I can tell we can only filter by an attribute when you are loading from BW INFOOBJECT using

  • How do I reload Address Book back on to my computer

    I have been difficulty with Address Book & Sycning to my phone. It completely deleted all my contacts! And I accidently deleted the Address Book as I was following the instruction to delete files from the library pertaining to Address Book as I was i

  • Using getDate for ResultSet in jsp

    Hello, In a jsp I'm trying to display a date stored in a mysql database. In the jsp i have put the following: <TD align='right'>Meeting Date</TD> <TD align='right'> <INPUT type='text' name='meetingDate' value='<%= rsClients.getDate("meetingDate") %>'

  • Problem on Query Generator

    Hi Expert, I made the following query: SELECT T0.[RefDate], T0.[TransId], T1.[Account], T1.[ShortName], T1.[Debit], T1.[Credit], T1.[ProfitCode] FROM OJDT T0  INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId WHERE T0.[RefDate] between [%0] and [%1] Howe