measure time intervals - Mailing list pgsql-general

From Vincent Dautremont
Subject measure time intervals
Date
Msg-id CAA4Vp4-Hcc9wsbnAquvthEe-_VCKr0P52gUyM6MEexo6y0qcFw@mail.gmail.com
Whole thread Raw
Responses Re: measure time intervals  (John R Pierce <pierce@hogranch.com>)
Re: measure time intervals  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
Hi,
I'm wondering ig it is possible to measure elapsed time between 2 particular queries in PostgreSQL.

what I need is the equivalent of @@TIMETICKS in Transac-SQL
or CLOCK_MONOTONIC  in Unix
or GetTickCount in Windows

These are not affected by system time changes, so time interval can be calculated even if the system time is changed by NTP or the user.
That's why I can't use any function based on system time.

pgsql-general by date:

Previous
From: Maxim Boguk
Date:
Subject: Postgresql 9.0.7 weird planner decision (rows in plan close to reality but plan suboptimal)
Next
From: "hans wulf"
Date:
Subject: 9.1.3 Standby catchup mode