Skip site navigation (1) Skip section navigation (2)

Re: explain analyze timings

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>,"PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: explain analyze timings
Date: 2005-03-20 13:42:24
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C70E5@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-hackers-win32pgsql-patches
>> There is. I beleive QueryPerformanceCounter has sub-mirosecond
>> resolution.
>
>> Can we just replace gettimeofday() with a version that's basically:
>
>No, because it's also used for actual time-of-day calls.  It'd be
>necessary to hack executor/instrument.c in particular.

Here's a patch that does just this.

On my system, the counter resolution is 3192090000 ticks per second
(Intel Xeon CPU). On a AMD Athlon XP system, it's 3579545 ticks per
second (a lot less, but still way way way better than gettimeofday has
on win32).

I also hacked commands/explain.c to get the total runtime of the query
correct.

//Magnus

Attachment: win32_instr.patch
Description: application/octet-stream (6.4 KB)

Responses

pgsql-patches by date

Next:From: Simon RiggsDate: 2005-03-20 15:31:48
Subject: Re: explain analyze timings
Previous:From: Greg StarkDate: 2005-03-20 06:49:37
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests

pgsql-hackers-win32 by date

Next:From: Simon RiggsDate: 2005-03-20 15:31:48
Subject: Re: explain analyze timings
Previous:From: Greg StarkDate: 2005-03-20 06:49:37
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group