DBMS_UTILITY.GET_TIME– Time is the number of 100th’s of a second from the point in time at which the subprogram is invoked.
DBMS_UTILITY.GET_CPU_TIME – Returns the current CPU time in 100th’s of a second
DECLARE V NUMBER; V_CPU_START NUMBER ; V_CPU_END NUMBER ; V_CPU_wynik NUMBER ; V_time_START NUMBER ; V_TIME_END NUMBER ; V_time_wynik NUMBER ; BEGIN V_CPU_START := DBMS_UTILITY.GET_CPU_TIME; V_time_START := DBMS_UTILITY.get_time; SELECT COUNT(*) INTO v FROM all_tables t, all_indexes i WHERE t.table_name = i.table_name; V_CPU_END := DBMS_UTILITY.GET_CPU_TIME; V_time_END := DBMS_UTILITY.get_time; V_CPU_WYNIK:= V_CPU_END - V_CPU_START; V_time_wynik:= V_time_END-V_time_START; DBMS_OUTPUT.PUT_LINE('Wynik CPU : '||V_CPU_wynik); DBMS_OUTPUT.PUT_LINE('Wynik Time: '||V_time_wynik); END; |