odd variances in count(*) times

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Pg Performance list" <pgsql-performance(at)postgresql(dot)org>
Subject: odd variances in count(*) times
Date: 2006-10-09 18:17:24
Message-ID: b42b73150610091117n29e8d9d5yed07abe8a228593e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I have two systems running 8.2beta1 getting strange difference of
results in count(*). Query that illistrates the difference is
count(*). this is a synthetic test i use to measure a sytems's cpu
performance.

System A:
2.2 ghz p4 northwood, HT
win xp
vanilla sata (1 disk)

System B:
amd 64 3700+
linux cent/os 4.4 32 bit
4 raptors, raid 5, 3ware

explain analyze select 5000!;
A: 2.4 seconds
B: 1.8 seconds

explain analyze select count(*) from generate_series(1,500000);
A: 0.85 seconds
B: 4.94 seconds

Both systems have a freshly minted database. By all resepcts I would
expect B to outperform A on most cpu bound tests with a faster
processor and linux kernel. memory is not an issue here, varying the
size of the count(*) does not effect the results, A is always 5x
faster than B. the only two variables i see are cpu and o/s.

Also tested on pg 8.1, results are same except pg 8.2 is about 10%
faster on both systems for count(*). (yay!) :-)

anybody think of anything obvious? should i profile? (windows mingw
profiling sucks)

merlin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Stephen Frost 2006-10-09 18:30:26 Re: odd variances in count(*) times
Previous Message Chris Browne 2006-10-09 18:07:29 Re: Simple join optimized badly?