On Thu, Apr 5, 2012 at 9:00 AM, Vincent Dautremont <vincent@xxxxxxxxxxxxxxxx> wrote: > 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. one way that will work is to write a C module for postgres that wraps the system call. that's a heavy dependency for such a small thing though. also FYI GetTickCount wraps around approximately every three and a half weeks. merlin -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general