Unix Technical Forum

Re: [pgsql-hackers-win32] Help with tuning this query (with

This is a discussion on Re: [pgsql-hackers-win32] Help with tuning this query (with within the Pgsql Performance forums, part of the PostgreSQL category; --> > > RDTSC is a bad source of information for this kind of thing, as the > > CPU ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:14 AM
Magnus Hagander
 
Posts: n/a
Default Re: [pgsql-hackers-win32] Help with tuning this query (with

> > RDTSC is a bad source of information for this kind of thing, as the
> > CPU frequency might vary.

>
> One thought that was bothering me was that if the CPU goes
> idle while waiting for disk I/O, its clock might stop or slow
> down dramatically.
> If we believed such a counter for EXPLAIN, we'd severely
> understate the cost of disk I/O.
>
> I dunno if that is the case on any Windows hardware or not,
> but none of this thread is making me feel confident that we
> know what QueryPerformanceCounter does measure.


I'm "reasonaly confident" that QPC will measure actual wallclock time as
passed, using a chip that is external to the CPU. (Don't ask me which
chip :P).

The docs specifically say: "Note that the frequency of the
high-resolution performance counter is not the processor speed."

It also indicates that it is possible for hardware not to support it, in
which case the frequency will be reported as zero. I don't know any
remotely modern wintel system that doesn't, though - it seems this may
be referring to the old MIPS port of NT that didn't have it.

I also find:
"Depending on the processor and exact version of NT you're using, on an
Intel you get either the Time Stamp Counter, or the 1.1... MHz timer
built into the motherboard."


So I think we're perfectly safe relying on it. And certainly not alone
in doing so :-)

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:53 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com