X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7492C4758E6 for ; Thu, 13 Feb 2003 13:06:16 -0500 (EST) Received: from biomax.de (unknown [212.6.137.236]) by postgresql.org (Postfix) with ESMTP id 474B3474E42 for ; Thu, 13 Feb 2003 13:06:15 -0500 (EST) Received: from biomax.de (guffert.biomax.de [192.168.3.166]) by biomax.de (8.8.8/8.8.8) with ESMTP id TAA11165 for ; Thu, 13 Feb 2003 19:05:56 +0100 Message-ID: <3E4BDE8B.5040908@biomax.de> Date: Thu, 13 Feb 2003 19:06:03 +0100 From: Chantal Ackermann User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: cost and actual time Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/60 X-Sequence-Number: 1116 hello all, I am still fiddling around with my "big" database. System: RAM: 2GB CPU: 1,6 MHz (cache: 256 Kb) single disc: 120 GB :-( I have a query that joins to relatively large tables (10 - 15 Mio rows), or part of these tables (explain analyze: rows=46849) respectively. long story short: allover cost estimated in pages by explain is: cost=6926.59..6926.60 actual time is from explain analyze is: actual time=275461.91..275462.44 most of it is consumed by a nested loop (surprise!) this is the respective output: Sort Key: disease.disease_name, disease_occurrences.sentence_id -> Nested Loop (cost=0.00..6922.38 rows=98 width=64) (actual time=61.49..275047.46 rows=18910 loops=1) -> Nested Loop (cost=0.00..6333.23 rows=98 width=28) (actual time=61.42..274313.87 rows=18910 loops=1) -> Nested Loop (cost=0.00..5894.04 rows=64 width=16) (actual time=32.00..120617.26 rows=46849 loops=1) I tried to tweak the conf settings, but I think I already reached quite a good value concerning shared buffers and sort mem. the database is vacuum full analyzed. indexes seem fine. could one of you smart guys point me into a direction I might not have considered? - I know that the hardware is the minimum. nevertheless - if you have suggestions what exactely to add to the hardware to boost the database up (more RAM or more discs - even a RAID) - this would be a good argument for my boss. Thank you a lot Chantal