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

"Dave Page" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.performance
Message-ID <E7F85A1B5FF8D44C8A1AF6885BC9A0E472B994@ratbert.vale-housing.co.uk>
 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf 
> Of Tom Lane
> Sent: 07 March 2005 22:57
> To: John A Meinel
> Cc: Dave Held; [email protected]; 
> [email protected]
> Subject: Re: [pgsql-hackers-win32] [PERFORM] Help with tuning 
> this query (with 
> 
> Which brings up a question: just what does QueryPerformanceCounter
> measure?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/w
inui/windowsuserinterface/windowing/timers/abouttimers.asp says:

If a high-resolution performance counter exists on the system, you can
use the QueryPerformanceFrequency function to express the frequency, in
counts per second. The value of the count is processor dependent. On
some processors, for example, the count might be the cycle rate of the
processor clock.

The QueryPerformanceCounter function retrieves the current value of the
high-resolution performance counter. By calling this function at the
beginning and end of a section of code, an application essentially uses
the counter as a high-resolution timer. For example, suppose that
QueryPerformanceFrequency indicates that the frequency of the
high-resolution performance counter is 50,000 counts per second. If the
application calls QueryPerformanceCounter immediately before and
immediately after the section of code to be timed, the counter values
might be 1500 counts and 3500 counts, respectively. These values would
indicate that .04 seconds (2000 counts) elapsed while the code executed.


Regards, Dave.

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

               http://www.postgresql.org/docs/faq
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.