From: | Fernando Hevia <fhevia(at)gmail(dot)com> |
---|---|
To: | Alessandra Campos Alfaro <alesscalf(at)gmail(dot)com> |
Cc: | Lista PostgreSQL <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: Tiempo de ejecucion |
Date: | 2014-03-29 23:39:16 |
Message-ID: | CAGYT1XTU9vTohB0D_1hzEG2TG1ZjP9xzyPx=+JbDUO8apHFX8A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
2014-03-29 14:21 GMT-03:00 Alessandra Campos Alfaro <alesscalf(at)gmail(dot)com>:
> Tengo una rutina con RAISE NOTICE 'Value of id : %', id; sin embargo me
> gustaria poder tambier indicar el tiempo que lleva hasta ese momento la
> funcion de postgres en ejecucion, sabran Uds como podre llevar a cabo
> aquello?
>
También podés usar clock_timestamp() para medir diferenciales de tiempo
entre queries en una misma función. Ej:
DECLARE
v_tiempo timestamp with time zone;
BEGIN
v_tiempo := clock_timestamp();
RAISE NOTICE 'T Inicio: %', v_tiempo;
SELECT now() ;
RAISE NOTICE 'Delta T1: %', clock_timestamp() - v_tiempo;
SELECT now() ;
RAISE NOTICE 'Delta T2: %', clock_timestamp() - v_tiempo;
END;
Saludos.
From | Date | Subject | |
---|---|---|---|
Next Message | ʚïɞ...liss ...εïз | 2014-03-31 20:26:41 | restaurar una bd de postgresql 8.2 a 9.3 |
Previous Message | Martín Marqués | 2014-03-29 21:11:26 | Re: Tiempo de ejecucion |