當前位置:首頁 » 編程語言 » sql等待

sql等待

發布時間: 2023-09-19 00:47:44

❶ Oracle的sql語句中wait的含義

nowait:立即執行,如果另有會話正在修改該記錄會立即報告錯誤:ORA-00054: 資源正忙,要求指定 NOWAIT;如果不選擇nowait選項則會一直處理等待狀態。
wait [n]:等待n秒,如果另有會話正在修改該記錄會報告錯誤:ORA-30006: 資源已被佔用; 執行操作時出現 WAIT 超時
=>另外,還有一個skip locked。
skip locked:跳過已被別的會話鎖定的記錄

❷ SQL*Net break/reset to client 等待事件是什麼原因造成的

如果運行的代碼中包含某種可能的錯誤,且在調用中觸發了的話,伺服器端本地的服務進程有義務對遠程客戶端告知該信息,這個告知的過程中服務進程就處於SQL*Net break/reset to client等待中,直到客戶端收到問題信息為止。

大的查詢,表的不合理連接也會照成。
SQL> select * from v$mystat where rownum=1;

SID STATISTIC# VALUE
---------- ---------- ----------
135 0 1

SQL> insert into test05 values(1);

1 row inserted

SQL> commit;

Commit complete

SQL> alter session set events '10046 trace name context forever,level 8';

Session altered

查看trace文件

FETCH #1:c=0,e=204594,p=72,cr=129,cu=0,mis=0,r=1,dep=1,og=4,tim=6307709774
EXEC #2:c=0,e=263868,p=72,cr=130,cu=11,mis=0,r=0,dep=0,og=1,tim=6307739186
ERROR #2:err=1 tim=0
WAIT #2: nam='SQL*Net break/reset to client' ela= 3 driver id=1111838976 break?=1 p3=0 obj#=-1 tim=6307747970
WAIT #2: nam='SQL*Net break/reset to client' ela= 100 driver id=1111838976 break?=0 p3=0 obj#=-1 tim=6307748498

由於等待很短,需要查看v$session_wait_history視圖來追蹤,需要在別的session查看,不然可能查不到。
select event from v$session_wait_history where sid=135
SQL*Net message to client
SQL*Net break/reset to client
SQL*Net break/reset to client
SQL*Net message from client
SQL*Net message to client
SQL*Net message from client
SQL*Net message to client
SQL*Net message from client
SQL*Net message to client
SQL*Net message from client

SQL> create table test05(t int primary key);

Table created

熱點內容
java返回this 發布:2025-10-20 08:28:16 瀏覽:566
製作腳本網站 發布:2025-10-20 08:17:34 瀏覽:855
python中的init方法 發布:2025-10-20 08:17:33 瀏覽:555
圖案密碼什麼意思 發布:2025-10-20 08:16:56 瀏覽:733
怎麼清理微信視頻緩存 發布:2025-10-20 08:12:37 瀏覽:656
c語言編譯器怎麼看執行過程 發布:2025-10-20 08:00:32 瀏覽:975
郵箱如何填寫發信伺服器 發布:2025-10-20 07:45:27 瀏覽:227
shell腳本入門案例 發布:2025-10-20 07:44:45 瀏覽:87
怎麼上傳照片瀏覽上傳 發布:2025-10-20 07:44:03 瀏覽:777
python股票數據獲取 發布:2025-10-20 07:39:44 瀏覽:683