Unix Technical Forum

Re: [pgsql-hackers-win32] Help with tuning this query (with explain analyze finally)

This is a discussion on Re: [pgsql-hackers-win32] Help with tuning this query (with explain analyze finally) within the Pgsql Performance forums, part of the PostgreSQL category; --> > >> What platform is this on? It seems very strange/fishy > that all the > >> actual-time values ...


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:13 AM
Magnus Hagander
 
Posts: n/a
Default Re: [pgsql-hackers-win32] Help with tuning this query (with explain analyze finally)

> >> What platform is this on? It seems very strange/fishy
> that all the
> >> actual-time values are exact integral milliseconds.

>
> > My machine is WinXP professional, athon xp 2100, but I get similar
> > results on my Intel P4 3.0Ghz as well (which is also

> running WinXP).
> > Why do you ask?

>
> Well, what it suggests is that gettimeofday() is only
> returning a result good to the nearest millisecond. (Win32
> hackers, does that sound right?)


Yes. The gettimeofday() implementation (in
src/backend/port/gettimeofday.c).
Actually, in reality you don't even get millisecond resolution it seems
(after some reading up). More along the line of
10-millisecond-resolution.

See for example
http://msdn.microsoft.com/msdnmag/is...solutionTimer/.



> Most modern machines seem to have clocks that can count
> elapsed time down to near the microsecond level. Anyone know
> if it's possible to get such numbers out of Windows, or are
> we stuck with milliseconds?


There are, see link above. But it's definitly not easy. I don't think we
can just take the complete code from their exmaple (due to licensing).
We could go with the "middle way", but it has a couple of pitfalls.

Do we need actual high precision time, or do we just need to be able to
get high precision differences? Getting the differences is fairly easy,
but if you need to "sync up" any drif then it becomes a bit more
difficult.


//Magnus

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

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:13 AM
Tom Lane
 
Posts: n/a
Default Re: [pgsql-hackers-win32] Help with tuning this query (with explain analyze finally)

"Magnus Hagander" <mha@sollentuna.net> writes:
> Do we need actual high precision time, or do we just need to be able to
> get high precision differences? Getting the differences is fairly easy,
> but if you need to "sync up" any drif then it becomes a bit more
> difficult.


You're right, we only care about differences not absolute time. If
there's something like a microseconds-since-bootup counter, it would
be fine.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

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:49 PM.


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