X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 45CB3D1B238 for ; Mon, 7 Jun 2004 14:18:31 -0300 (ADT) 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 14737-08 for ; Mon, 7 Jun 2004 17:18:30 +0000 (GMT) Received: from fe07.axelero.hu (fe07.axelero.hu [195.228.240.95]) by svr1.postgresql.org (Postfix) with ESMTP id AA618D1B265 for ; Mon, 7 Jun 2004 14:18:27 -0300 (ADT) Received: from fe07 (localhost-02 [127.0.2.1]) by fe07.axelero.hu (8.12.11/8.12.11) with SMTP id i57HIRHT008434 for ; Mon, 7 Jun 2004 19:18:27 +0200 (CEST) Received: from fe07.axelero.hu [127.0.2.1] via SMTP gateway by fe07 [195.228.240.95]; id A020EFDB599 at Mon, 07 Jun 2004 19:18:26 +0200 Received: from fejleszt4 (121-248-182-81.adsl-fixip.axelero.hu [81.182.248.121]) by fe07.axelero.hu (8.12.11/8.12.11) with SMTP id i57HIMHd008312 for ; Mon, 7 Jun 2004 19:18:23 +0200 (CEST) Message-ID: <0a0101c44cb3$89d3c2b0$0403a8c0@fejleszt4> From: "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" To: References: <076f01c44c62$208aa680$0403a8c0@fejleszt4> <2604.1086616316@sss.pgh.pa.us> Subject: Re: Relation of cpu_*_costs? Date: Mon, 7 Jun 2004 19:19:06 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-RAVMilter-Version: 8.4.3(snapshot 20030217) (fe07.axelero.hu) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/65 X-Sequence-Number: 7123 Dear Tom, Thanks for your response. ----- Original Message ----- From: "Tom Lane" Sent: Monday, June 07, 2004 3:51 PM > That's pretty hard to believe; particularly on modern machines, I'd > think that moving it down would make more sense than moving it up. > You're essentially asserting that the CPU time to process one tuple > is almost half of the time needed to bring a page in from disk. That is exactly what I had in mind. We found that 5x10krpm HW RAID 5 array blazing fast, while we were really disappointed about CPU. E.g. * tar'ing 600MB took seconds; gzip'ing it took minutes. * initdb ran so fast that I didn't have time to hit Ctrl+C because I forgot a switch ;) * dumping the DB in or out was far faster than adddepend between 7.2 and 7.3 * iirc index scans returning ~26k rows of ~64k were faster than seq scan. (most suspicious case of disk cache) But whatever is the case with my hardware -- could you tell me something (even a search keyword ;) ) about my theoretical question: i.e. relation of cpu_*_costs? > I suspect that your test cases were toy cases small enough to be > fully cached and thus not incur any actual I/O ... Dunno. The server has 1GB RAM; full DB is ~100MB; largest query was ~7k which moved at least 2 tables of >200k rows and several smaller ones. If it is a "toy case" for such hw, I humbly accept your opinion. BTW its runtime improved from 53 to 48 sec -- all due to changing cpu tuple cost. I ran the query at different costs, in fast succession: run cost sec #1 0.01 53 #2 0.4 50 #3 1.0 48 #4 1.0 48 #5 0.4 48 #6 0.01 53 For the second result, I'd say disk cache, yes-- but what about the last result? It's all the same as the first one. Must have been some plan change (I can send the exp-ana results if you wish) G. %----------------------- cut here -----------------------% \end