Taking time to execute if where clause have  parathesis

SELECT t0.CONVICTION_ID, t0.JDO_CLASS_TXT, t0.CONVICTION_CD, t0.CONVICTION_DT, t0.CONVICTION_DESC_CD, t0.CONVICTION_LEVEL_CD, t0.DRIVER_ID, t0.HIST_NUM, t0.LAST_UPD_DT, t0.REPORT_ID, t0.SOURCE_CD, t0.APPEAL_END_DT, t0.CASE_NUM_TXT, t0.CGI_VIOLATION_CD, t0.CONVICTION_LOC_TXT, t0.XREF_CASE_NUM_TXT, t0.CUM_DEMERIT_NUM, t0.DEMERIT_THIS_OFFENSE_NUM, t0.END_DT, t0.OFFENCE_TYPE_CD, t0.PROV_CONVICTION_CD, t0.REINSTATE_DT, t0.SEVERITY_CD, t0.START_DT
FROM CUSTOMER.RDB_EIG_DD_CONVICTIONS t0
WHERE t0.DRIVER_ID = :1
SELECT t0.CONVICTION_ID, t0.JDO_CLASS_TXT, t0.CONVICTION_CD, t0.CONVICTION_DT, t0.CONVICTION_DESC_CD, t0.CONVICTION_LEVEL_CD, t0.DRIVER_ID, t0.HIST_NUM, t0.LAST_UPD_DT, t0.REPORT_ID, t0.SOURCE_CD, t0.APPEAL_END_DT, t0.CASE_NUM_TXT, t0.CGI_VIOLATION_CD, t0.CONVICTION_LOC_TXT, t0.XREF_CASE_NUM_TXT, t0.CUM_DEMERIT_NUM, t0.DEMERIT_THIS_OFFENSE_NUM, t0.END_DT, t0.OFFENCE_TYPE_CD, t0.PROV_CONVICTION_CD, t0.REINSTATE_DT, t0.SEVERITY_CD, t0.START_DT
FROM CUSTOMER.RDB_EIG_DD_CONVICTIONS t0
WHERE (t0.DRIVER_ID = :1)

When you're query takes too long...
When your query takes too long ...

Similar Messages

  • Query taking time to execute

    Hello,
    i have created one query based on inventory cube 0IC_C03. when i am executing the infocube based on a particular date i am able to see the output but when i am executing the query on the basis of that particular date given while executing the cube the query is taking long time to execute and throwing a message of time limit exceed.
    could anyone suggest me why the query is showing such nessage along with resolution.
    Thanks,
    Kumkum
    Edited by: kumkum basu on Nov 29, 2010 2:33 PM

    Hi,
    There can be number of reason.
    What you can do is:-
    put the unwanted characteristics in Free Characteristics
    Remove unwanted cell reference
    Try using partitions in cubes
    Use aggregates for summarised data.
    f the above options doesnt work, then try pre-caching.This will definitely help!
    Use proper selections to get small subset of data.
    Goto RSRT>> type your query name>> Query properties>> select cache mode=4
    In addition to RSRT, ST05 (sql trace), SE30 (runtime analysis) and system statistics (ST03) may help you in identifying performance issues with a report.
    Thanks,.
    Saveen Kumar

  • Why does my iPhoto seem to get "stuck" a lot of times to the point where I have to force quit it and how do I fix it?

    Why does my iphoto seem to get "stuck" a lot of the times when I try to exit it to the point where I have to "force quit" it and how do I fix the problem that causes it?

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    does this only happen when you try to quit iPhoto?
    what fixes have you tried?
    where is your library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    what type of Mac?
    how much free space on your boot drive?
    Happy Holidays

  • Report is taking time to execute the following query

    Hi All,
    I have one query using in reports6i,which i am describing down,its taking half an hour to execute.
    I need to tune the query,if any one could help or any suggestions...........highly appreciable.
    SELECT +ALL_ROWS
    DISTINCT sm.orgn_code,
    sm.sample_no,
    -- DECODE (sm.batch_id, NULL, 'Item/Locn', 'Production') AS sample_type,
    NVL2(sm.batch_id, 'Production', 'Item/Locn') AS sample_type,
    sm.date_drawn,
    su.user_name AS drawn_by,
    im.item_no,
    lm.lot_no,
    im.inv_type,
    qt.test_code,
    rm.user_name AS result_by,
    rm.result_date,
    qt.test_type,
    qv.min_value_num,
    qv.max_value_num,
    DECODE(qt.test_type, 'N', TO_CHAR(qv.min_value_num) || ' - ' || TO_CHAR(qv.max_value_num), NULL) AS the_range,
    DECODE(qt.test_type, 'N', TO_CHAR(qv.target_value_num), qv.target_value_char) AS the_spec,
    DECODE(qt.test_type, 'N', TO_CHAR(rm.result_value_num), rm.result_value_char) AS the_result,
    DECODE(qt.test_unit, 'N/A', NULL, qt.test_unit) AS qc_uom,
    DECODE(sm.sample_disposition,
    '0RT',
    'RETAIN',
    '1P',
    'PENDING',
    '2I',
    'IN PROGRESS',
    '3C',
    'COMPLETE',
    '4A',
    'ACCEPT',
    '5AV',
    'ACCEPT WITH VARIANCE',
    '6RJ',
    'REJECT',
    '7CN',
    'CANCEL',
    NULL) AS disposition
    FROM gmd.gmd_samples sm,
    -- gmd.gmd_results rm,
    gmd.gmd_qc_tests_b qt,
    gmd.gmd_specifications_b sp,
    gmd.gmd_spec_tests_b qv,
    gmi.ic_lots_mst lm,
    apps.ic_item_mst im,
    applsys.fnd_user su,
    (SELECT gr.result_date,
    gr.sample_id,
    gr.test_id,
    gr.result_value_num,
    gr.result_value_char,
    ru.user_name
    FROM gmd_results gr,
    applsys.fnd_user ru
    WHERE (to_date(to_char(gr.result_date,'mm/dd/yyyy'),'mm/dd/yyyy') BETWEEN
    to_date(to_char(:p_2_start_date,'mm/dd/yyyy'),'mm/dd/yyyy') AND
    to_date(to_char(:p_3_end_date,'mm/dd/yyyy'),'mm/dd/yyyy'))
    AND gr.result_date IS NOT NULL
    AND ru.user_id = gr.last_updated_by) rm
    WHERE 1 = 1 --rm.result_date IS NOT NULL
    -- AND TO_DATE (TO_CHAR (rm.result_date, 'mm/dd/yyyy'), 'mm/dd/yyyy') >=TO_DATE (TO_CHAR (:p_2_start_date, 'mm/dd/yyyy'), 'mm/dd/yyyy')
    -- AND TO_DATE (TO_CHAR (rm.result_date, 'mm/dd/yyyy'), 'mm/dd/yyyy') <=TO_DATE (TO_CHAR (:p_3_end_date, 'mm/dd/yyyy'), 'mm/dd/yyyy')
    AND im.inv_type = NVL (UPPER (:p_inv_type), im.inv_type)
    AND sm.orgn_code = UPPER (:p_1_orgn)
    AND sm.item_id = lm.item_id --double
    AND sm.lot_id = lm.lot_id
    AND sm.item_id = lm.item_id --double
    AND sm.item_id = im.item_id
    AND sp.item_id = im.item_id
    AND rm.sample_id = sm.sample_id
    AND su.user_id = sm.sampler_id
    -- AND ru.user_id = rm.last_updated_by
    AND rm.test_id = qt.test_id
    AND qt.test_id = qv.test_id
    AND qv.spec_id = sp.spec_id
    AND sp.spec_status = 700
    AND qt.test_code LIKE NVL(:p_test, '%')
    AND ( ( qt.test_type = 'N'
    AND ( rm.result_value_num < qv.min_value_num
    OR rm.result_value_num > qv.max_value_num))
    OR ( qt.test_type <> 'N'
    AND rm.result_value_char <> 'OK'
    AND rm.result_value_char <> qv.target_value_char)
    Thanks in Advance

    You may want to consider demoralization views/tables or create indexes etc. to improve performance. Post it to
    PL/SQL
    to get more and quicker responses.

  • For loop its taking time to execute if more records

    Hi
    I want to move the data with some condition and formatting which has 165000 rows in a table.
    I want use loop to fetch these records and move to another table. I am using for .. loop to execute, its taking long time .
    which way is better to execute fast?
    Thanks in advance,
    Maran

    user8732035 wrote:
    Hi
    I want to move the data with some condition and formatting which has 165000 rows in a table.
    I want use loop to fetch these records and move to another table. I am using for .. loop to execute, its taking long time .
    which way is better to execute fast?
    Thanks in advance,
    MaranLooping is bad... it is actually row-by-row processing of data(i.e. slow-by-slow processing).
    So, in place of using Pl/Sql, instead simply use a INSERT SQL query.
    insert into <table1>
    select col1,col2,... from <table2>
      where <condns>;HTH
    Ranit B.

  • MY QUERY IS TAKING TIME WHILE EXECUTING IN WAD

    HI BW GURUS
    If i execute the report(using query with variables) which contains 8,50,000 records in WAD then its taking more than 900 seconds and say Connection timed out at the end.
    If i execute the same query in Query designer using Web browser then it will take 400 seconds to show all the data in hierarchy or tabular view.
    I've done tuning using RSRT on query read mode and persistent mode etc..
    Can you please help me?

    Execution plan depends on many factors, statistics status of the objects, system statistics if you are using, init.ora parameters like mulitblock_read_count, parallellism, etc.
    If you want to use same execution plan for all database, you should refer stored_outline. In 10g you can try sql profiling.
    Ashok

  • Slow split table export (R3load and WHERE clause)

    For our split table exports, we used custom coded WHERE clauses. (Basically adding additional columns to the R3ta default column to take advantage of existing indexes).
    The results have been good so far. Full tablescans have been eliminated and export times have gone down, in some cases, tables export times have improved by 50%.
    However, our biggest table, CE1OC01 (120 GB), continues to be a bottleneck. Initially, after using the new WHERE clause, it looked like performance gains were dramatic, with export times for the first 5 packages dropping from 25-30 hours down to 1 1/2 hours.
    However, after 2 hours, the remaining CE1OC01 split packages have shown no improvement. This is very odd because we are trying to determine why part of the table exports very fast, but other parts are running very slow.
    Before the custom WHERE clauses, the export server had run into issues with SORTHEAP being exhausted, so we thought that might be the culprit. But that does not seem to be an issue now, since the improved WHERE clauses have reduced or eliminated excessive sorting.
    I checked the access path of all the CE1OC01 packages, through EXPLAIN, and they all access the same index to return results. The execution time in EXPLAIN returns similar times for each of the packages:
    CE1OC01-11: select * from CE1OC01  WHERE MANDT='212'
    AND ("BELNR" > '0124727994') AND ("BELNR" <= '0131810250')
    CE1OC01-19: select * from CE1OC01 WHERE MANDT='212'
    AND ("BELNR" > '0181387534') AND ("BELNR" <= '0188469413')
          0 SELECT STATEMENT ( Estimated Costs =  8.448E+06 [timerons] )
      |
      ---      1 RETURN
          |
          ---      2 FETCH CE1OC01
              |
              ------   3 IXSCAN CE1OC01~4 #key columns:  2
    query execution time [millisec]            |       333
    uow elapsed time [microsec]                |   429,907
    total user CPU time [microsec]             |         0
    total system cpu time [microsec]           |         0
    Both queries utilize an index that has fields MANDT and BELNR. However, during R3load, CE1OC01-19 finishes in an hour and a half, whereas CE1OC01-11 can take 25-30 hours.
    I am wondering if there is anything else to check on the DB2 access path side of things or if I need to start digging deeper into other aggregate load/infrastructure issues. Other tables don't seem to exhibit this behavior. There is some discrepancy between other tables' run times (for example, 2-4 hours), but those are not as dramatic as this particular table.
    Another idea to test is to try and export only 5 parts of the table at a time, perhaps there is a throughput or logical limitation when all 20 of the exports are running at the same time. Or create a single column index on BELNR (default R3ta column) and see if that shows any improvement.
    Anyone have any ideas on why some of the table moves fast but the rest of it moves slow?
    We also notice that the "fast" parts of the table are at the very end of the table. We are wondering if perhaps the index is less fragmented in that range, a REORG or recreation of the index may do this table some good. We were hoping to squeeze as many improvements out of our export process as possible before running a full REORG on the database. This particular index (there are 5 indexes on this table) has a Cluster Ratio of 54%, so, perhaps for purposes of the export, it may make sense to REORG the table and cluster it around this particular index. By contrast, the primary key index has a Cluster Ratio of 86%.
    Here is the output from our current run. The "slow" parts of the table have not completed, but they average a throughput of 0.18 MB/min, versus the "fast" parts, which average 5 MB/min, a pretty dramatic difference.
    package     time      start date        end date          size MB  MB/min
    CE1OC01-16  10:20:37  2008-11-25 20:47  2008-11-26 07:08   417.62    0.67
    CE1OC01-18   1:26:58  2008-11-25 20:47  2008-11-25 22:14   429.41    4.94
    CE1OC01-17   1:26:04  2008-11-25 20:47  2008-11-25 22:13   416.38    4.84
    CE1OC01-19   1:24:46  2008-11-25 20:47  2008-11-25 22:12   437.98    5.17
    CE1OC01-20   1:20:51  2008-11-25 20:48  2008-11-25 22:09   435.87    5.39
    CE1OC01-1    0:00:00  2008-11-25 20:48                       0.00
    CE1OC01-10   0:00:00  2008-11-25 20:48                     152.25
    CE1OC01-11   0:00:00  2008-11-25 20:48                     143.55
    CE1OC01-12   0:00:00  2008-11-25 20:48                     145.11
    CE1OC01-13   0:00:00  2008-11-25 20:48                     146.92
    CE1OC01-14   0:00:00  2008-11-25 20:48                     140.00
    CE1OC01-15   0:00:00  2008-11-25 20:48                     145.52
    CE1OC01-2    0:00:00  2008-11-25 20:48                     184.33
    CE1OC01-3    0:00:00  2008-11-25 20:48                     183.34
    CE1OC01-4    0:00:00  2008-11-25 20:48                     158.62
    CE1OC01-5    0:00:00  2008-11-25 20:48                     157.09
    CE1OC01-6    0:00:00  2008-11-25 20:48                     150.41
    CE1OC01-7    0:00:00  2008-11-25 20:48                     175.29
    CE1OC01-8    0:00:00  2008-11-25 20:48                     150.55
    CE1OC01-9    0:00:00  2008-11-25 20:48                     154.84

    Hi all, thanks for the quick and extremely helpful answers.
    Beck,
    Thanks for the health check. We are exporting the entire table in parallel, so all the exports begin at the same time. Regarding the SORTHEAP, we initially thought that might be our problem, because we were running out of SORTHEAP on the source database server. Looks like for this run, and the previous run, SORTHEAP has remained available and has not overrun. That's what was so confusing, because this looked like a buffer overrun.
    Ralph,
    The WHERE technique you provided worked perfectly. Our export times have improved dramatically by switching to the forced full tablescan. Being always trained to eliminate full tablescans, it seems counterintuitive at first, but, given the nature of the export query, combined with the unsorted export, it now makes total sense why the tablescan works so much better.
    Looks like you were right, in this case, the index adds too much additional overhead, and especially since our Cluster Ratio was terrible (in the 50% range), so the index was definitely working against us, by bouncing all over the place to pull the data out.
    We're going to look at some of our other long running tables and see if this technique improves runtimes on them as well.
    Thanks so much, that helped us out tremendously. We will verify the data from source to target matches up 1 for 1 by running a consistency check.
    Look at the throughput difference between the previous run and the current run:
    package     time       start date        end date          size MB  MB/min
    CE1OC01-11   40:14:47  2008-11-20 19:43  2008-11-22 11:58   437.27    0.18
    CE1OC01-14   39:59:51  2008-11-20 19:43  2008-11-22 11:43   427.60    0.18
    CE1OC01-12   39:58:37  2008-11-20 19:43  2008-11-22 11:42   430.66    0.18
    CE1OC01-13   39:51:27  2008-11-20 19:43  2008-11-22 11:35   421.09    0.18
    CE1OC01-15   39:49:50  2008-11-20 19:43  2008-11-22 11:33   426.54    0.18
    CE1OC01-10   39:33:57  2008-11-20 19:43  2008-11-22 11:17   429.44    0.18
    CE1OC01-8    39:27:58  2008-11-20 19:43  2008-11-22 11:11   417.62    0.18
    CE1OC01-6    39:02:18  2008-11-20 19:43  2008-11-22 10:45   416.35    0.18
    CE1OC01-5    38:53:09  2008-11-20 19:43  2008-11-22 10:36   413.29    0.18
    CE1OC01-4    38:52:34  2008-11-20 19:43  2008-11-22 10:36   424.06    0.18
    CE1OC01-9    38:48:09  2008-11-20 19:43  2008-11-22 10:31   416.89    0.18
    CE1OC01-3    38:21:51  2008-11-20 19:43  2008-11-22 10:05   428.16    0.19
    CE1OC01-2    36:02:27  2008-11-20 19:43  2008-11-22 07:46   409.05    0.19
    CE1OC01-7    33:35:42  2008-11-20 19:43  2008-11-22 05:19   414.24    0.21
    CE1OC01-16    9:33:14  2008-11-20 19:43  2008-11-21 05:16   417.62    0.73
    CE1OC01-17    1:20:01  2008-11-20 19:43  2008-11-20 21:03   416.38    5.20
    CE1OC01-18    1:19:29  2008-11-20 19:43  2008-11-20 21:03   429.41    5.40
    CE1OC01-19    1:16:13  2008-11-20 19:44  2008-11-20 21:00   437.98    5.75
    CE1OC01-20    1:14:06  2008-11-20 19:49  2008-11-20 21:03   435.87    5.88
    PLPO          0:52:14  2008-11-20 19:43  2008-11-20 20:35    92.70    1.77
    BCST_SR       0:05:12  2008-11-20 19:43  2008-11-20 19:48    29.39    5.65
    CE1OC01-1     0:00:00  2008-11-20 19:43                       0.00
                558:13:06  2008-11-20 19:43  2008-11-22 11:58  8171.62
    package     time      start date        end date          size MB   MB/min
    CE1OC01-9    9:11:58  2008-12-01 20:14  2008-12-02 05:26   1172.12    2.12
    CE1OC01-5    9:11:48  2008-12-01 20:14  2008-12-02 05:25   1174.64    2.13
    CE1OC01-4    9:11:32  2008-12-01 20:14  2008-12-02 05:25   1174.51    2.13
    CE1OC01-8    9:09:24  2008-12-01 20:14  2008-12-02 05:23   1172.49    2.13
    CE1OC01-1    9:05:55  2008-12-01 20:14  2008-12-02 05:20   1188.43    2.18
    CE1OC01-2    9:00:47  2008-12-01 20:14  2008-12-02 05:14   1184.52    2.19
    CE1OC01-7    8:54:06  2008-12-01 20:14  2008-12-02 05:08   1173.23    2.20
    CE1OC01-3    8:52:22  2008-12-01 20:14  2008-12-02 05:06   1179.91    2.22
    CE1OC01-10   8:45:09  2008-12-01 20:14  2008-12-02 04:59   1171.90    2.23
    CE1OC01-6    8:28:10  2008-12-01 20:14  2008-12-02 04:42   1172.46    2.31
    PLPO         0:25:16  2008-12-01 20:14  2008-12-01 20:39     92.70    3.67
                90:16:27  2008-12-01 20:14  2008-12-02 05:26  11856.91

  • Using :case when  in where clause

    Hello,
    I need some help with using of case statement in a where clause
    Table that contains info about employees taking some coursework:
    Class (values could be SAP, ORACLE, JAVA)
    Code (if Class is SAP then CODE is not null; if class is any other CODE is NULL)
    Start Date (date they began class not null)
    End Date (date then ended the class - could be null)
    Employee Level(numbers from one through five)
    I need a single LOV in forms that should show Employee_Level for input class,code,date.
    How to do this?
    I started off with this but get 'missing statement error'
    select distinct employee_level from e_course
       where (
       case when &class='SAP' then code ='1' and start_date > to_date('20000101','YYYYMMDD') and
                                               end_date < to_date('20000101','YYYYMMDD')
               else
                   null
       end) order by employee_level;Thanks

    Hi,
    user469956 wrote:
    But all these examples have only one condition for each case.Depending on how you count, all WHERE clauses have only one condition.
    I see an example in that thread that has 6 atomic conditions, linked by AND and OR.
    I need to check date & code. This is what is causing the error.Why do you want to use a CASE statement?
    Why can't you put all your conditions directly iinto a WHERE clause, soemthing like this:
    WHERE   (   &class='SAP'
            AND code ='1'
    OR      (   start_date  > to_date('20000101','YYYYMMDD')
            AND end_date    < to_date('20000101','YYYYMMDD')
            )I said "something like this" because I don't know what you really want to do.

  • Dynamically set ViewObject where clause dynamically from Java bean

    I have a requirement to display all of the records from a table when the JSP is first brought up, so my View Object looks like this:
    "select emp_name from emp"
    Then the users wants to ability to pass paramters to that View Object to refine the list so from by Java class I tried to do this:
    ViewObject vo = cpd.findViewObject("EmpViewObject");
    vo.setWhereClause("empName = :1");
    vo.setWhereClauseParam(1,varEmpName);
    vo.executeQuery();
    But I am getting JBO errors and I'm not sure what I'm doing wrong. Can anyone offer a hint as to how I can do this?

    this is exactly how the code is done -
    1. emp_name in the View Object
    2. emp_name in the where clause
    The two are identical. I have tried many variations of this - any time I set the where clause from my bean I get an error.
    When I take the SQL stmnt and run it in TOAD it returns expected rows when I run it in the SQL worksheet in JDev it gives an invalid Identifier - but if I hard code the where clause in the View Object it returns the same results as TOAD.

  • How to debug a background task that takes a lot of time to execute

    My workflow consists of a background task which takes a significant amount of time to execute completely. I have executed the BO method from SWO1 and it works fine.. takes just few secs to execute.
    But when this method is executed through workflow as a background task, it takes more than 20 mins to execute.
    What can be the possible causes and how do I debug this.

    Dear Tiyasha,
    You can debug your task even if it is a back ground task.
    The process is as follows :
    The place where want to place your break point put an infinite while loop just before your actual code.Now execute your workflow , now go to sm54 there u will find your entry and from here you can go to the debugger .In the debugger make the value of the while loop to be true so that u can proceed.
    Here u will able to debug it properly.
    Regards,
    Geet

  • Selecting with rownum=1 taking time

    Hi, I am using below script in one of my PL/SQL program. The strange thing is that this is taking time to execute. But If we gather stats on user_scheduler_job_run_details, it executes quickly. Looks like it is doing a full table scan in the 1st  case. Any idea about why this is happening.   SELECT *   FROM user_scheduler_job_run_details   where ROWNUM = 1 Thanks.

    Hi,
    1) USER_SCHEDULER_JOB_RUN_DETAILS is a view. How do you collect optimizer stats on a view?!
    2) "the strange thing is that this is taking time to execute" -- there is nothing strange about that. Everything takes time. How much time does the query take exactly?
    3) "looks like it is doing a full table scan" -- post appropriate diagnostic information for this query, e.g. SQL real-time monitor output, dbms_xplan.display_cursor output or tkprof'ed trace file.
    Best regards,
      Nikolay

  • Can we use where clause in Update on Merge statement?

    Hi All,
    I tried to execute the following Merge Query:
    When this query is executed without ‘Where clause’ in Update statement its working fine. When executed with ‘Where clause’ it throwing the following error:
    ORA-00905: missing keyword.
    Following is the sample query which I tried to execute:
    MERGE INTO TABLE_NAME
    USING (SELECT COLUMN FORM TABLES)
    ON (CONDITION)
    WHEN MATCHED THEN
    UPDATE SET
         COLUMN UPATES
    WHERE CONDITION -- Can we use where clause here?
    WHEN NOT MATCHED THEN
    INSERT
    INSERT VALUES;
    Can some one help on this?
    Thanks in advance.
    Darius

    Yes:
    SQL> drop table emp1;
    Table dropped.
    SQL> create table emp1 as select * from emp where deptno = 30;
    Table created.
    SQL> update emp1 set sal = sal*2;
    6 rows updated.
    SQL> commit;
    Commit complete.
    SQL> select ename,sal from emp1;
    ENAME             SAL
    ALLEN            3200
    WARD             2500
    MARTIN           2500
    BLAKE            5700
    TURNER           3000
    JAMES            1900
    6 rows selected.
    SQL> MERGE INTO emp1
      2  USING(select * from emp) emp
      3  ON (emp1.empno = emp.empno)
      4  WHEN MATCHED THEN
      5  UPDATE SET sal = emp.sal WHERE ename = 'TURNER'
      6  WHEN NOT MATCHED THEN
      7  INSERT(ename,sal) VALUES(emp.ename,emp.sal);
    9 rows merged.
    SQL> select ename,sal from emp1;
    ENAME             SAL
    ALLEN            3200
    WARD             2500
    MARTIN           2500
    BLAKE            5700
    TURNER 1500
    JAMES            1900
    SMITH             800
    JONES            2975
    CLARK            2450
    SCOTT            3000
    KING             5000
    ENAME             SAL
    ADAMS            1100
    FORD             3000
    MILLER           1300
    14 rows selected.
    SQL> SY.

  • Where Clause Generation

    A nice addition to Raptor would be a where clause generator:
    Selecting cells in a grid (of one or multiple data rows) and execute the "Where Clause Generator" action would generate the where clause to restrict the current select by the values in the cells selected.
    The where clause could be added automatically to the current select or be placed in the clipboard.

    A nice addition to Raptor would be a where clause generator:
    Selecting cells in a grid (of one or multiple data rows) and execute the "Where Clause Generator" action would generate the where clause to restrict the current select by the values in the cells selected.
    The where clause could be added automatically to the current select or be placed in the clipboard.

  • Query takes time to execute

    I am creating a jsp application . . . .I am retreiving some values from my database oracle 10g..my query taking time to execute even in isql plus..am uisng tomcat5 and oracle 10gR2..can anyone pls tell me why it happens...my query fetches data from four tables...i dont know exactly why its taking so muc time say 50seconds...when i run the application in my local host it retrievs fast when i do that in server it creates a problem..
    Actually it works fine when i deployed in my client server it takes time sometimes it takes atmost one minute
    1.pls tell me how can i test my query about the performance
    2.is der any command in oracle to test
    3.how much bytes it takes

    Look at this thread...
    When your query takes too long ...

  • How to know which sql query is taking time for concurrent program

       Hi sir,
    I am running concurrent program,that is taking time to execute ,i want to know which sql query causing performance
    Thanaks,
    Sreekanth

    Hi,
    My Learning: Diagnosing Oracle Applications Concurrent Programmes - 11i/R12
    How to run a Trace for a Concurrent Program? (Doc ID 415640.1)
    FAQ: Common Tracing Techniques in Oracle E-Business Applications 11i and R12 (Doc ID 296559.1)
    How To Get Level 12 Trace And FND Debug File For Concurrent Programs (Doc ID 726039.1)
    How To Trace a Concurrent Request And Generate TKPROF File (Doc ID 453527.1)
    Regards
    Yoonas

Maybe you are looking for

  • ITunes Library on an external hard drive to be used by Mac and PC

    I have my music library on my PC and am willing to do whatever it takes to have it be read by both computers from the external drive. The external drive is already formatted properly so I don't need to worry about anything there. I transferred all of

  • PHP issue website not displaying content

    hi, i have updated my site (www.kiraamerica.com) but i have a few issues. 1.  there are white boxes that i can not seem to get rid of or find in the codes / css's anywhere. - driving me nuts. 2.  when i click on the link "ram style VTL" it doesnt dis

  • Digital Signatures in MII

    Hello experts.. How can we apply digital signature/ electronic signature  in MII 12.0/12.1? Any idea.. Thanks a lot. Best Regards, Kedar

  • URGENT: button rollover animations and image fade ins?

    Hello, I have a site where an image appears which has 6 words on it. Each word will be a button where the following actions take place: on rollover a line draws through the button an image fades in on the left and another on the right when you click

  • Is my hard disk detected correctly?

    Drive: EIDE WD1200JB 120GB 8mb cache (Western Digital) When I used Gentoo last year I had problems with slow file copying because DMA wasn't enabled. In Arch it feels like the DMA is ok, but I've noticed that sometimes a program will fail to load, bu