應用FriendFeed來晉升MySQL機能的辦法。本站提示廣大學習愛好者:(應用FriendFeed來晉升MySQL機能的辦法)文章只能為提供參考,不一定能成為您想要的結果。以下是應用FriendFeed來晉升MySQL機能的辦法正文
SQL> SELECT KTUXEUSN, KTUXESLT, KTUXESQN, /* Transaction ID */ 2 KTUXESTA Status, KTUXECFL Flags ,KTUXESIZ 3 FROM x$ktuxe 4 WHERE ktuxesta!='INACTIVE'; KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ ---------- ---------- ---------- ---------------- ------------------------ ---------- 13 5 47447 ACTIVE DEAD 2819919 39 0 502 ACTIVE NONE 1 43 45 480 ACTIVE NONE 0
SQL> / KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ ---------- ---------- ---------- ---------------- ------------------------ ---------- 13 5 47447 ACTIVE DEAD 2819919<----該值沒減小。 39 0 502 ACTIVE NONE 1 43 45 480 ACTIVE NONE 0
查詢v$px_session和v$fast_start_servers,顯示許多並行過程在rollback,依據以往的工程經歷:
因而改成
SQL>alter system set fast_start_parallel_rollback=false scope=both;
以後,再次運轉
SQL> SELECT KTUXEUSN, KTUXESLT, KTUXESQN,/* Transaction ID */ 2 KTUXESTA Status, KTUXECFL Flags ,KTUXESIZ 3 FROM x$ktuxe 4 WHERE ktuxesta!='INACTIVE'; KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ ---------- ---------- -------------------------- ------------------------ ---------- 13 5 47447 ACTIVE DEAD 2033516 35 29 502 ACTIVE NONE 1 SQL> / KTUXEUSN KTUXESLT KTUXESQN STATUS FLAGS KTUXESIZ ---------- ---------- -------------------------- ------------------------ ---------- 13 5 47447 ACTIVE DEAD 2033433<---該值赓續變小。 35 29 502 ACTIVE NONE 1
應用以下劇本檢查回滾終了的估計時光(以天為單元):
SQL> set serveroutput on SQL> declare 2 l_start number; 3 l_end number; 4 begin 5 select ktuxesiz into l_startfrom x$ktuxe where KTUXEUSN=13 and KTUXESLT=5; 6 dbms_lock.sleep(60); 7 select ktuxesiz into l_endfrom x$ktuxe where KTUXEUSN=13 and KTUXESLT=5; 8 dbms_output.put_line('time estDay:'|| round(l_end/(l_start -l_end)/60/24,2)); 9 end; 10 / time est Day:.21
24*0.21=5.04小時。即:估計5.04小時後回滾終了。
別的留意:在其他情況應用時,請留意調換KTUXEUSN=13和KTUXESLT=5