Minientrada

ORACLE Medir Tiempos


SET SERVEROUTPUT ON
DECLARE
v_d1 TIMESTAMP ;
v_d2 TIMESTAMP ;
v_n INTERVAL DAY TO SECOND ;
v_variable NUMBER;
BEGIN
v_d1 := SYSTIMESTAMP ;
SELECT count(*) into v_variable from TABLE;
v_d2 := SYSTIMESTAMP ;
v_n := v_d2-v_d1 ;
DBMS_OUTPUT.PUT_LINE( 'Tiempo transcurrido : ' ||EXTRACT( SECOND FROM v_n )|| ' segundos' ) ;
END;

Anuncios