Re: measure time intervals
| От | Merlin Moncure |
|---|---|
| Тема | Re: measure time intervals |
| Дата | |
| Msg-id | CAHyXU0ynLSKNMrUzoX5D2Wh6HVbAuFPY3Xyn8ws8riNBKbKS7A@mail.gmail.com обсуждение исходный текст |
| Ответ на | measure time intervals (Vincent Dautremont <vincent@searidgetech.com>) |
| Список | pgsql-general |
On Thu, Apr 5, 2012 at 9:00 AM, Vincent Dautremont <vincent@searidgetech.com> 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
В списке pgsql-general по дате отправления: