X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9AD99D1B4D2 for ; Wed, 11 Feb 2004 14:49:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39828-06 for ; Wed, 11 Feb 2004 10:49:04 -0400 (AST) Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id 97178D1B4DE for ; Wed, 11 Feb 2004 10:49:00 -0400 (AST) Received: from [134.22.71.39] (dyn-71-39.tor.dsl.tht.net [134.22.71.39]) by tht.net (Postfix) with ESMTP id CFDB776AAE; Wed, 11 Feb 2004 09:49:05 -0500 (EST) Subject: Re: slow database From: Rod Taylor To: alemon@tiago.hazor.com.br Cc: Postgresql Performance In-Reply-To: <1076509411.402a3ae38d9b8@tiago.hazor.com.br> References: <1076509411.402a3ae38d9b8@tiago.hazor.com.br> Content-Type: text/plain Message-Id: <1076510965.761.17.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 11 Feb 2004 09:49:26 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/126 X-Sequence-Number: 5650 On Wed, 2004-02-11 at 09:23, alemon@tiago.hazor.com.br wrote: > my data base is very slow. The machine is a processor Xeon 2GB with > 256 MB of RAM DDR. My archive of configuration is this: I'm not surprised. New values below old. > sort_mem = 131072 # min 64, size in KB sort_mem = 8192. > fsync = false Are you aware of the potential for data corruption during a hardware, power or software failure? > enable_seqscan = false > enable_indexscan = false > enable_tidscan = false > enable_sort = false > enable_nestloop = false > enable_mergejoin = false > enable_hashjoin = false You want all of these set to true, not false. > effective_cache_size = 170000 # typically 8KB each effective_cache_size = 16384. > random_page_cost = 1000000000 # units are one sequential page fetch cost random_page_cost = 3 > cpu_tuple_cost = 0.3 # (same) cpu_tuple_cost = 0.01 > cpu_index_tuple_cost = 0.6 # (same) cpu_index_tuple_cost = 0.001 > cpu_operator_cost = 0.7 # (same) cpu_operator_cost = 0.0025 > default_statistics_target = 1 # range 1-1000 default_statistics_target = 10