> -----Original Message-----
> From: Tom Lane [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 07, 2005 10:39 AM
> To: John A Meinel
> Cc: Magnus Hagander; Ken Egervari; pgsql-performance@postgresql.org;
> Subject: Re: [pgsql-hackers-win32] [PERFORM] Help with tuning 
> this query
> (with explain analyze finally)
> [...]
> The EXPLAIN ANALYZE instrumentation code will really be happier with a
> straight time-since-bootup counter; by using gettimeofday, it is
> vulnerable to giving wrong answers if someone changes the date setting
> while the EXPLAIN is running.  But there is (AFAIK) no such call among
> the portable Unix syscalls.  It seems reasonable to me to #ifdef that
> code to make use of QueryPerformanceCounter on Windows.  This does not
> mean we want to alter the behavior of gettimeofday() where it's being
> used to find out the time of day.

There is always clock().  It's mandated by ANSI C, but my docs say
that POSIX requires CLOCKS_PER_SEC == 1000000 regardless of actual
timer resolution, which seems a little brain-dead to me.

David B. Held
Software Engineer/Array Services Group
200 14th Ave. East,  Sartell, MN 56377
320.534.3637 320.253.7800 800.752.8129

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Reply via email to