X-Original-To: pgsql-hackers-win32-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 10DF052AA6; Tue, 8 Mar 2005 01:38:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77490-07; Tue, 8 Mar 2005 01:38:12 +0000 (GMT) Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by svr1.postgresql.org (Postfix) with ESMTP id 9036C56491; Tue, 8 Mar 2005 01:38:11 +0000 (GMT) Received: from trofast.ipv6.sesse.net ([2001:700:300:dc03:20e:cff:fe36:a766] helo=trofast.sesse.net) by cassarossa.samfundet.no with esmtp (Exim 4.34) id 1D8TfW-0004j5-NJ; Tue, 08 Mar 2005 02:37:58 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1D8TfT-0007lE-00; Tue, 08 Mar 2005 02:37:51 +0100 Date: Tue, 8 Mar 2005 02:37:50 +0100 From: "Steinar H. Gunderson" To: Dave Held Cc: Greg Stark , John A Meinel , Tom Lane , Magnus Hagander , Ken Egervari , pgsql-performance@postgresql.org, pgsql-hackers-win32@postgresql.org Subject: Re: [PERFORM] Help with tuning this query (with Message-ID: <20050308013750.GA29367@uio.no> Mail-Followup-To: Dave Held , Greg Stark , John A Meinel , Tom Lane , Magnus Hagander , Ken Egervari , pgsql-performance@postgresql.org, pgsql-hackers-win32@postgresql.org References: <49E94D0CFCD4DB43AFBA928DDD20C8F90261846C@asg002.asg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <49E94D0CFCD4DB43AFBA928DDD20C8F90261846C@asg002.asg.local> X-Operating-System: Linux 2.6.11-rc3 on a i686 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.026 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/64 X-Sequence-Number: 3022 On Mon, Mar 07, 2005 at 06:11:34PM -0600, Dave Held wrote: >> In which case using it would be a mistake. Since rtdsc doesn't >> work across processors. > It doesn't always use RDTSC. I can't find anything authoritative on > when it does. I would assume that it would use RDTSC when available > and something else otherwise. RDTSC is a bad source of information for this kind of thing, as the CPU frequency might vary. Check your QueryPerformanceFrequency() -- most likely it will not match your clock speed. I haven't tested on a lot of machines, but I've never seen QueryPerformanceFrequency() ever match the clock speed, which it most probably would if it was using RDTSC. (I've been told it uses some other kind of timer available on most motherboards, but I don't know the details.) /* Steinar */ -- Homepage: http://www.sesse.net/