Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 616A82E0045 for ; Thu, 20 Mar 2008 07:48:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 62251-03 for ; Thu, 20 Mar 2008 07:48:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by postgresql.org (Postfix) with ESMTP id 7E3012E0039 for ; Thu, 20 Mar 2008 07:48:14 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d37so1518967pye.29 for ; Thu, 20 Mar 2008 03:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=2s2T+vMNgrMhRX/9WcIitPWrgmACjJ084ctT5ym5+jQ=; b=qP8/ukmOXG/ZA5unjoCdUjDTuZO/PaHlo8sUO8CsqaUmuNMUlJEPY6w8+KDPMU1UHgwHSjLiCIG+IFtF/S0QLTZxLxnw1GclruWIwxLnzpJHuxqVYCNze1uzmuY+hY109TLbkTN2u0ScB/Zwqzn1yvEbnpixST1882oxeAnnwBI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=VdYNyUz7kWFjlMAxE8CDbdtUaG0GtXeLKkZUPtwdhPmiMTY7jiTdqPEYJIokLqPHW8VMdI/Jdey+m1ZcMb6mj8KD/avUvIVjfXy6f8GG6pkQe1H33j/ILkqVvWdyp+htJwreBeGZbIlutC3WT5TCZTqyJvKcVJiUke93njfmr0A= Received: by 10.65.212.3 with SMTP id o3mr3227948qbq.49.1206010093157; Thu, 20 Mar 2008 03:48:13 -0700 (PDT) Received: by 10.65.103.9 with HTTP; Thu, 20 Mar 2008 03:48:13 -0700 (PDT) Message-ID: <669dc9710803200348x64122249jd2ac5924d78a6da0@mail.gmail.com> Date: Thu, 20 Mar 2008 11:48:13 +0100 From: "Laurent Raufaste" To: pgsql-performance@postgresql.org Subject: Re: PG writes a lot to the disk In-Reply-To: <669dc9710803190418g45002e87k19cb742579c1eeac@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <669dc9710803190418g45002e87k19cb742579c1eeac@mail.gmail.com> X-Google-Sender-Auth: ec8ec1e335d3b2b5 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.286 tagged_above=0 required=5 tests=AWL=-0.029, SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 200803/406 X-Sequence-Number: 29360 2008/3/19, Laurent Raufaste : > What does it writes so much in the base directory ? If it's some > temporary table or anything, how can I locate it so I can fix the > problem ? Thanks for your help everybody ! I fixed the problem by doing an ANALYZE to every table (yes I'm so noob ;) ). The problem was that the optimiser didn't know how to run the queries well and used millions of tuples for simple queries. For each tuple used it was updating some bit in the table file, resulting in a huge writing activity to that file. After the ANALYZE, the optimiser worked smarter, used thousand time less tuple for each query, and PG was not required to update so much bits in the table files. The server is now OK, thanks ! -- Laurent Raufaste