How to tune  the threshold to a very low value

Hi,
how to set the thershold to a very low value for database 9i. on which critieria we will tune this thershold value of DB

user606944 wrote:
I/o thershold value?There is no threshold value... unless there is some base line to measure against.
Also, I/O threshold values in what respect? Number of reads/sec? Writes/sec? Latency per I/O call? Number of bytes per second?
A solution is only as good as the problem definition. You have not defined any problem.. thus it is quite difficult to suggest any type of solution to you.

Similar Messages

  • Hi Lèonie, it is still recording only 8 minutes (more or less). I take off the 'metronomo', time is 'on', the section timing is on 'automatic'. What do you mean saying 'set the tempo to a very low value'  ? Thank you again. Ipad Retina ...

    Hi Lèonie, I tried, but it still recording only 8 minutes (more or less).
    I took off the 'metronomo', tempo is on (automatic), the section time
    is on (automatic).
    What do you mean when you say "set the tempo to a very low value" ?
    Thank you again.
    Best Regards,
    Enrico

    Enrico,
    in your previous post you said:
    GarageBand (used with a Mic microphone) is stopping to record after only 7/8 minutes.
    In which way I may record a complete concert or at least one hour of music ???
    If you want to record at least one hour of music, you need to make the max. of 320 bars last for a long time - for example:
    With a maximum of 320 bars, a song with160 bpm and a 4/4 measure will only last for 8 minutes; to make it last 32 minutes, reduce the tempo to 40 bpm.
    Léonie

  • How to Tune the Transactions/ Z - reports /Progr..of High response time

    Dear friends,
    in <b>ST03</b> work load anlysis menu.... there are some z-reports, transactions, and some programmes are noticed contineously that they are taking the <b>max. response time</b> (and mostly >90%of time is  DB Time ).
    how to tune the above situation ??
    Thank u.

    Siva,
    You can start with some thing like:
    ST04  -> Detail Analysis -> SQL Request (look at top disk reads and buffer get SQL statements)
    For the top SQL statements identified you'd want to look at the explain plan to determine if the SQL statements is:
    1) inefficient
    2) are your DB stats up to date on the tables (note up to date stats does not always means they are the best)
    3) if there are better indexes available, if not would a more suitable index help?
    4) if there are many slow disk reads, is there an I/O issue?
    etc...
    While you're in ST04 make sure your buffers are sized adequately.
    Also make sure your Oracle parameters are set according to this OSS note.
    Note 830576 - Parameter recommendations for Oracle 10g

  • How to tune the follwoing procedure?

    create or replace procedure sample(verror_msg in out varchar2,
    vbrn_num in tb_branches.brn_num%type) is
    ltext1 varchar2(500);
    ltext2 varchar2(500);
    ltable_name varchar2(50);
    lcolumn_name varchar2(50);
    ldata_type varchar2(50);
    lold_rcn_num number;
    lnew_rcn_num number;
    lvalue varchar2(50);
    lunit_type char(1);
    lsql_stmt1 varchar2(500);
    lstring varchar2(500);
    lcol varchar2(10);
    lstart_time VARCHAR2(100);
    lend_time VARCHAR2(100);
    lcommit VARCHAR2(10) := 'COMMIT;';
    lfile_handle1 utl_file.file_type;
    lfile_handle2 utl_file.file_type;
    lfile_handle3 utl_file.file_type;
    lfile_handle4 utl_file.file_type;
    lfile_name1 VARCHAR2(50) := 'RCN_UPDATE_STMTS_' || vbrn_num || '.SQL';
    lfile_name2 VARCHAR2(50) := 'RCNSUCCESS_' || vbrn_num || '.TXT';
    lfile_name3 VARCHAR2(50) := 'RCNFAIL_' || vbrn_num || '.TXT';
    lfile_name4 VARCHAR2(50) := 'RCNERROR_' || vbrn_num || '.TXT';
    ldirectory_name VARCHAR2(100);
    ldirectory_path VARCHAR2(100);
    lspool_on VARCHAR2(100);
    lspool_off VARCHAR2(100);
    TYPE ref_cur IS REF CURSOR;
    cur_tab_cols ref_cur;
    cursor c1 is
    SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE
    FROM USER_TAB_COLS
    WHERE TABLE_NAME NOT LIKE 'TB_CONV%'
    and TABLE_NAME LIKE 'TB_%'
    AND COLUMN_NAME LIKE '%RCN%'
    UNION
    SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE
    FROM USER_TAB_COLS
    WHERE TABLE_NAME in ('TB_UNITCODES', 'TB_HIST_UNITCODES')
    AND COLUMN_NAME = 'UNIT_CODE'
    order by table_name;
    BEGIN
    verror_msg := nvl(verror_msg, 0);
    begin
    SELECT DISTINCT directory_path, directory_name
    INTO ldirectory_path, ldirectory_name
    FROM tb_conv_path
    WHERE brn_num = vbrn_num;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    SP_CO_RAISEERROR('00SY00402', 'F', 'T');
    WHEN others THEN
    SP_CO_RAISEERROR('00SY00401X', 'F', 'T');
    END;
    lfile_handle1 := utl_file.fopen(ldirectory_name, lfile_name1, 'W', 32767);
    lfile_handle2 := utl_file.fopen(ldirectory_name, lfile_name2, 'W', 32767);
    lfile_handle3 := utl_file.fopen(ldirectory_name, lfile_name3, 'W', 32767);
    lfile_handle4 := utl_file.fopen(ldirectory_name, lfile_name4, 'W', 32767);
    SELECT 'SPOOL ' || ldirectory_path || '/LOG_' || lfile_name1
    INTO lspool_on
    FROM dual;
    utl_file.put_line(lfile_handle1, lspool_on);
    utl_file.new_line(lfile_handle1, 1);
    select 'EXEC SP_CONV_START_TIMELOG(' || '''' || 'LOG_' || lfile_name1 || '''' || ',' ||
    vbrn_num || ');'
    into lstart_time
    from dual;
    UTL_FILE.PUT_LINE(lfile_handle1, lstart_time);
    UTL_FILE.NEW_LINE(lfile_handle1, 1);
    open C1;
    loop
    Fetch C1
    into ltable_name, lcolumn_name, ldata_type;
    Exit When C1%notFound;
    lsql_stmt1 := 'select column_name from user_tab_columns where table_name =' || '''' ||
    ltable_name || '''' ||
    ' AND column_name in (''BRN_NUM'',''BRANCH'',''BRANCH_NUMBER'')';
    begin
    execute immediate lsql_stmt1
    into lcol;
    exception
    when no_data_found then
    lcol := null;
    end;
    if lcol is not null then
    if ltable_name in ('TB_UNITCODES', 'TB_HIST_UNITCODES') then
    ltext2 := 'select distinct ' || lcolumn_name || ' from ' ||
    ltable_name ||
    ' a, (select distinct new_rcn_num col from tb_conv_rcn_mapping where brn_num = ' ||
    vbrn_num || ') b where a.' || lcolumn_name ||
    ' = b.col(+) and b.col is null and a.' || lcolumn_name ||
    ' is not null and ' || lcol || ' = ' || vbrn_num ||
    ' and a.unit_type=''9''';
    else
    ltext2 := 'select distinct ' || lcolumn_name || ' from ' ||
    ltable_name ||
    ' a, (select distinct new_rcn_num col from tb_conv_rcn_mapping where brn_num = ' ||
    vbrn_num || ') b where a.' || lcolumn_name ||
    ' = b.col(+) and b.col is null and a.' || lcolumn_name ||
    ' is not null and ' || lcol || ' = ' || vbrn_num;
    end if;
    OPEN cur_tab_cols FOR ltext2;
    loop
    fetch cur_tab_cols
    into lvalue;
    exit when cur_tab_cols%notfound;
    begin
    IF VBRN_NUM IN (21, 6, 7, 8) THEN  Commented during NAP HK SIT cycle1
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND BRN_NUM = VBRN_NUM;
    /* ELSE
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND NEW_RCN_NUM NOT LIKE '40%'
    AND NEW_RCN_NUM NOT LIKE '41%'
    AND NEW_RCN_NUM NOT LIKE '42%'
    AND NEW_RCN_NUM NOT LIKE '65%'
    AND BRN_NUM = VBRN_NUM;
    END IF; */ -- Commented during NAP HK SIT cycle1
    if ldata_type = 'NUMBER' then
    if ltable_name in ('TB_UNITCODES', 'TB_HIST_UNITCODES') and
    lcolumn_name = 'UNIT_CODE' then
    begin
    select distinct unit_type
    into lunit_type
    from TB_UNITCODES
    where lcol = vbrn_num
    and unit_code = lvalue
    and unit_type = '9';
    exception
    when no_data_found then
    lunit_type := null;
    end;
    if lunit_type is not null then
    ltext1 := 'update ' || ltable_name || ' set ' ||
    lcolumn_name || ' = ' || lnew_rcn_num ||
    ' where ' || lcolumn_name || ' = ' ||
    lold_rcn_num || ' and ' || lcol || ' = ' ||
    vbrn_num || ' and unit_type = ' || '''9''' || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    else
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || lnew_rcn_num || ' where ' || lcolumn_name ||
    ' = ' || lold_rcn_num || ' and ' || lcol || ' = ' ||
    vbrn_num || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    else
    if ltable_name in ('TB_UNITCODES', 'TB_HIST_UNITCODES') and
    lcolumn_name = 'UNIT_CODE' then
    begin
    lstring := 'select distinct unit_type from ' || ltable_name ||
    ' where ' || lcol || ' = ' || vbrn_num ||
    ' and ' || lcolumn_name || ' = ' || '''' ||
    lvalue || '''' || ' and unit_type = ' || '''9''';
    execute immediate lstring
    into lunit_type;
    exception
    when no_data_found then
    lunit_type := null;
    end;
    if lunit_type is not null then
    ltext1 := 'update ' || ltable_name || ' set ' ||
    lcolumn_name || ' = ' || '''' || lnew_rcn_num || '''' ||
    ' where ' || lcolumn_name || ' = ' || '''' ||
    lold_rcn_num || '''' || ' and ' || lcol || ' = ' ||
    vbrn_num || ' and unit_type = ' || '''9''' || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    else
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || '''' || lnew_rcn_num || '''' || ' where ' ||
    lcolumn_name || ' = ' || '''' || lold_rcn_num || '''' ||
    ' and ' || lcol || ' = ' || vbrn_num || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    end if;
    exception
    When NO_DATA_FOUND THEN
    utl_file.put_line(lfile_handle3,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || 'NO MAPPING FOUND' ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle3, 0);
    when others then
    utl_file.put_line(lfile_handle4,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || SQLERRM || ' - ' ||
    vbrn_num);
    utl_file.new_line(lfile_handle4, 0);
    end;
    end loop;
    ELSE
    ltext2 := 'select distinct ' || lcolumn_name || ' from ' ||
    ltable_name ||
    ' a, (select distinct new_rcn_num col from tb_conv_rcn_mapping where brn_num = ' ||
    vbrn_num || ') b where a.' || lcolumn_name ||
    ' = b.col(+) and b.col is null and a.' || lcolumn_name ||
    ' is not null';
    OPEN cur_tab_cols FOR ltext2;
    loop
    fetch cur_tab_cols
    into lvalue;
    exit when cur_tab_cols%notfound;
    begin
    IF VBRN_NUM IN (21, 6, 7, 8) THEN  Commented during NAP HK SIT cycle1
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND BRN_NUM = VBRN_NUM;
    /* ELSE
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND NEW_RCN_NUM NOT LIKE '40%'
    AND NEW_RCN_NUM NOT LIKE '41%'
    AND NEW_RCN_NUM NOT LIKE '42%'
    AND NEW_RCN_NUM NOT LIKE '65%'
    AND BRN_NUM = VBRN_NUM;
    END IF; */ -- Commented during NAP HK SIT cycle1
    if ldata_type = 'NUMBER' then
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || lnew_rcn_num || ' where ' || lcolumn_name ||
    ' = ' || lold_rcn_num || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lold_rcn_num || ' - ' || lnew_rcn_num ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    else
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || '''' || lnew_rcn_num || '''' || ' where ' ||
    lcolumn_name || ' = ' || '''' || lold_rcn_num || '''' || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lold_rcn_num || ' - ' || lnew_rcn_num ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    exception
    When NO_DATA_FOUND THEN
    utl_file.put_line(lfile_handle3,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || 'NO MAPPING FOUND' ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle3, 0);
    when others then
    utl_file.put_line(lfile_handle4,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || SQLERRM || ' - ' ||
    vbrn_num);
    utl_file.new_line(lfile_handle4, 0);
    end;
    end loop;
    end if;
    end loop;
    close c1;
    utl_file.new_line(lfile_handle1, 1);
    select 'EXEC SP_CONV_END_TIMELOG(' || '''' || 'LOG_' || lfile_name1 || '''' || ',' ||
    vbrn_num || ');'
    into lend_time
    from dual;
    UTL_FILE.PUT_LINE(lfile_handle1, lend_time);
    UTL_FILE.NEW_LINE(lfile_handle1, 1);
    SELECT 'SPOOL OFF;' INTO lspool_off FROM dual;
    utl_file.put_line(lfile_handle1, lspool_off);
    utl_file.new_line(lfile_handle1, 1);
    utl_file.fclose(lfile_handle1);
    utl_file.fclose(lfile_handle2);
    utl_file.fclose(lfile_handle3);
    utl_file.fclose(lfile_handle4);
    exception
    when others then
    verror_msg := sqlcode || ' ~ ' || sqlerrm;
    utl_file.put_line(lfile_handle4,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || SQLERRM || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle4, 0);
    utl_file.new_line(lfile_handle4, 0);
    utl_file.fclose(lfile_handle1);
    utl_file.fclose(lfile_handle2);
    utl_file.fclose(lfile_handle3);
    utl_file.fclose(lfile_handle4);
    end sample;

    duplicate:
    how to tune the follwoing procedure?

  • How to tune the query...?

    Hi all,
    I am having a table with millions of records and the query is taking hours
    time. How to tune the query apart from doing the following things.
    1. Creating or Deleting indexes.
    2. Using Bind variables.
    3. Using Hints.
    4. Updating the Statitics regurarly.
    Actually, i have asked this question in interview how to tune the query.
    I told him the above 4 things. Then he told, these are not working, then
    how you will tune this query.
    Thanks in advance,
    Pal

    user546710 wrote:
    Actually, i have asked this question in interview how to tune the query.
    I told him the above 4 things. Then he told, these are not working, then
    how you will tune this query.It actually depends on the scenario/problem given.
    You may want to read this first.
    When your query takes too long ...
    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting
    HOW TO: Post a SQL statement tuning request - template posting

  • My WiFi is not working on my ipod touch third gen. The wifi option in setting is blanked out so i am unabole to select it. I have tried restored it and resetting network connections. Also the battery life is very low.

    My WiFi is not working on my ipod touch third gen. The wifi option in setting is blanked out so i am unabole to select it. I have tried restored it and resetting network connections. Also the battery life is very low. How do i fix this????????????

    If a restore did not fix it, you have a hardware issue--possible bad wi-fi radio.
    Basic troubleshooting steps. 
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 

  • My volume on the Iphone 3GS is very low is it an equipment problem, setting problem or update problem?

    My volume on the iPhone 3GS is very low. Is it an equipment problem, settings problem or update problem? And, is there a fix other than having Apple fix it?

    Have you had a look here to make sure it is set up how you want it...
    iPhone User Guide
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • How to restrict the user to enter only numeric values in a input field

    How to restrict the user to enter only numeric values in a input field.
    For example,
    i have an input field in that i would like to enter
    only numeric values. no special characters,alphabets .
    reply ASAP

    Hi Venuthurupalli,
    As valery has said once you select the value to be of type integer,once you perform an action it will be validated and error message that non numeric characters are there will be shown. If you want to set additional constraints like max value, min value etc you can use simple types for it.
    On the project structure on left hand side under local dictionary ->datatypes->simple types create a simple type of type integer
    The attribute which you are binding to value property ;make its type as simple type which you made
    Hope this helps you
    Regards
    Rohit

  • HOW TO KNOW THE  EACH PURCHASE ORDERS GROSS INVOICE  VALUE

    HI SIR,
    ANY  BODY PLESAE TELL ME
    HOW TO KNOW THE  EACH PURCHASE ORDERS GROSS INVOICE  VALUE BY GROUP WISE PER SPECIFIC TIME PERIOD.

    hi
    try ME80FN
    regards
    vijay

  • HT204405 The ringing voluom is very low on my new iPhone 5s

    THe ringing voluom is very low on my phone , is it the phone or the soft wear , I just bought the phone 2 days ago

    Hi Nouraldeen,
    Welcome to the Support Communities!
    As a first step, I would suggest restarting and/or resetting the iPhone:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    Here are some additional troubleshooting steps for sound on your iPhone:
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/TS1630
    Cheers,
    - Judy

  • MOVED: I have no sound /the sound level is VERY low: MSI K9MM-v

    This topic has been moved to AMD64 ATI/SiS/VIA based board.
    https://forum-en.msi.com/index.php?topic=115320.0

    Go to Control panel, Administrative Tools, Computer Management, Disk Management and allocate remaining disk space.
    OK, i can see around 22 GB of unallocated disk space. i will allocate the remaining disk space.
    Check Volume from mixer settings, cable connections, Volume on your speakers.
    I have checked and i've the sam problem. the volume in my speakers is maximum and no change. the sound level is VERY low. My speakers works because i have the test in my other PC.

  • The microphone has a very low level

    The microphone has a very low hearing and recording level, sound level is ok and no silence activated

    Is that a question?
    What are you looking for an answer to?
    There are no microphone controls.

  • HT1849 hello i downloaded an album on my iPad yesterday but the sound volume is very low. Can you help me to fix the problem ?

    hello i downloaded an album on my iPad yesterday but the sound volume is very low. Can someone help me to fix the problem ?

    Hello Kishore1022,
    It sounds like you have a new album downloaded and the tracks all have a very low volume. I recommend checking to see if Sound Check is enabled in the Music settings.
    iPad User Guide
    http://help.apple.com/ipad/7/#/iPad99f37037
    Go to Settings > Music to set options for Music, including:
    Sound Check (to normalize the volume level of your audio content)
    You can also try downloading the purchases onto a computer, with either of these articles depending on your version of the operating system:
    iTunes 11 for Windows: Download previous purchases from the iTunes Store
    http://support.apple.com/kb/PH12491
    Or
    iTunes 11 for Mac: Download previous purchases from the iTunes Store
    http://support.apple.com/kb/PH12283
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • How to tune the performance of Oracle SQL/XML query?

    Hi all,
    I am running Oracle 9i and like to run the following Oracle SQL/XML query. It takes about 3+ hour and still not finish. If I get rid all the XML stuffs it only take minutes to run. Does anybody know how to what's the reason of this slow and how to tune it?
    SELECT XMLElement("CUSTOMER",
    XMLForest(C_CUSTKEY "C_CUSTKEY", C_NAME "C_NAME", C_ADDRESS "C_ADDRESS", C_PHONE "C_PHONE", C_MKTSEGMENT "C_MKTSEGMENT", C_COMMENT "C_COMMENT"),
    (SELECT XMLAgg(XMLElement("ORDERS",
    XMLForest(O_ORDERKEY "O_ORDERKEY", O_CUSTKEY "O_CUSTKEY", O_ORDERSTATUS "O_ORDERSTATUS", O_ORDERPRIORITY "O_ORDERPRIORITY", O_CLERK "O_CLERK", O_COMMENT "O_COMMENT"),
    (SELECT XMLAgg(XMLElement("LINEITEM",
    XMLForest(L_ORDERKEY "L_ORDERKEY", L_RETURNFLAG "L_RETURNFLAG", L_LINESTATUS "L_LINESTATUS", L_SHIPINSTRUCT "L_SHIPINSTRUCT", L_SHIPMODE "L_SHIPMODE", L_COMMENT "L_COMMENT")
    FROM LINEITEM
    WHERE LINEITEM.L_ORDERKEY = ORDERS.O_ORDERKEY)
    FROM ORDERS
    WHERE ORDERS.O_CUSTKEY = CUSTOMER.C_CUSTKEY)
    FROM CUSTOMER ;
    Thanks very much in advance for your time,
    Jinghao Liu

    ajallen wrote:
    Why not something more like
    SELECT *
    FROM fact1 l,
    FULL OUTER JOIN fact1 d
    ON l.company = d.company
    AND l.transactiontypeid = 1
    AND d.transactiontypeid = 2;
    Because this is not an equivalent of the original query.
    drop table t1 cascade constraints purge;
    drop table t2 cascade constraints purge;
    create table t1 as select rownum t1_id from dual connect by level <= 5;
    create table t2 as select rownum+2 t2_id from dual connect by level <= 5;
    select * from (select * from t1 where t1_id > 2) t1 full outer join t2 on (t1_id = t2_id);
    select * from t1 full outer join t2 on (t1_id = t2_id and t1_id > 2);
         T1_ID      T2_ID
             3          3
             4          4
             5          5
                        6
                        7
         T1_ID      T2_ID
             1
             2
             3          3
             4          4
             5          5
                        6
                        7

  • How to tune the Update statement for 20 million rows

    Hi,
    I want to update 20 million rows of a table. I wrote the PL/SQL code like this:
    DECLARE
    v1
    v2
    cursor C1 is
    select ....
    BEGIN
    Open C1;
    loop
    fetch C1 bulk collect into v1,v2 LIMIT 1000
    exit when C1%NOTFOUND;
    forall i in v1.first..v1.last
    update /*+INDEX(tab indx)*/....
    end loop;
    commit;
    close C1;
    END;
    The above code took 24 mins to update 100k records, so for around 20 million records it will take 4800 mins (80 hrs).
    How can I tune the code further ? Will a simple Update statement, instead of PL/SQL make the update faster ?
    Will adding few more hints help ?
    Thanks for your suggestions.
    Regards,
    Yogini Joshi

    Hello
    You have implemented this update in the slowest possible way. Cursor FOR loops should be absolute last resort. If you post the SQL in your cursor there is a very good chance we can re-code it to be a single update statement with a subquery which will be the fastest possible way to run this. Please remember to use the {noformat}{noformat} tags before and after your code so the formatting is preserved.
    David                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for