Aks*_*edi 0 oracle datetime plsql date oracle12c
Question :
为什么我们将差异除以 100 以获得以秒为单位的时间?
Start
Get current time(Start Time)
Perform logical transaction
Get current time(End Time)
Subtract End Time – Start Time
Divide it by 100 to get total time in seconds. (Why 100?)
Stop
Run Code Online (Sandbox Code Playgroud)
试试下面的代码:
declare START_TIME PLS_INTEGER;
begin
START_TIME := DBMS_UTILITY.GET_TIME;
DBMS_OUTPUT.PUT_LINE('START_TIME-->'|| START_TIME);
dbms_lock.sleep(10);
DBMS_OUTPUT.PUT_LINE('DBMS_UTILITY.GET_TIME-->'|| DBMS_UTILITY.GET_TIME);
DBMS_OUTPUT.PUT_LINE('execution time --> ' || (dbms_utility.get_time - start_time)/100);
end;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
512 次 |
| 最近记录: |