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

Re: [PERFORM] Help with tuning this query (with

From: "Dave Held" <dave(dot)held(at)arrayservicesgrp(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"John A Meinel" <john(at)arbash-meinel(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [PERFORM] Help with tuning this query (with
Date: 2005-03-08 00:29:31
Message-ID: 49E94D0CFCD4DB43AFBA928DDD20C8F90261846D@asg002.asg.local (view raw or flat)
Thread:
Lists: pgsql-hackers-win32pgsql-performance
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Monday, March 07, 2005 4:57 PM
> To: John A Meinel
> Cc: Dave Held; pgsql-performance(at)postgresql(dot)org;
> pgsql-hackers-win32(at)postgresql(dot)org
> Subject: Re: [pgsql-hackers-win32] [PERFORM] Help with tuning 
> this query
> (with
> 
> John A Meinel <john(at)arbash-meinel(dot)com> writes:
> > Dave Held wrote:
> >> There is always clock().
> 
> > My experience with clock() on win32 is that CLOCKS_PER_SEC 
> > was 1000, and it had a resolution of 55clocks / s.

Which is why I suggested QueryPerformanceCounter for Win32.  I
only suggested clock() for *nix.

> The other problem is it measures process CPU time, not elapsed time
> which is probably more significant for our purposes.

Actually, the bigger problem is that a quick test of clock() on
Linux shows that it only has a maximum resolution of 10ms on my
hardware.  Looks like gettimeofday() is the best choice.

> Which brings up a question: just what does QueryPerformanceCounter
> measure?

I think it measures raw CPU cycles, roughly, which seems like it 
would more or less correspond to wall time.

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

pgsql-performance by date

Next:From: Steinar H. GundersonDate: 2005-03-08 01:37:50
Subject: Re: [PERFORM] Help with tuning this query (with
Previous:From: Dave HeldDate: 2005-03-08 00:11:34
Subject: Re: [PERFORM] Help with tuning this query (with

pgsql-hackers-win32 by date

Next:From: Steinar H. GundersonDate: 2005-03-08 01:37:50
Subject: Re: [PERFORM] Help with tuning this query (with
Previous:From: Dave HeldDate: 2005-03-08 00:11:34
Subject: Re: [PERFORM] Help with tuning this query (with

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