X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 07CC99FA42B for ; Mon, 12 Jun 2006 11:59:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 62575-04 for ; Mon, 12 Jun 2006 11:59:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.rentalia.net (mail.rentalia.com [213.192.209.8]) by postgresql.org (Postfix) with ESMTP id 4D62B9F9316 for ; Mon, 12 Jun 2006 11:59:03 -0300 (ADT) Received: (qmail 19109 invoked by uid 514); 12 Jun 2006 16:58:59 +0200 Received: from 62.37.216.115 by rigodon (envelope-from , uid 512) with qmail-scanner-1.25-st-qms (clamdscan: 0.88/1284. spamassassin: 3.0.2. perlscan: 1.25-st-qms. Clear:RC:0(62.37.216.115):SA:0(-2.2/5.0):. Processed in 5.096413 secs); 12 Jun 2006 14:58:59 -0000 X-Antivirus-MYDOMAIN-Mail-From: ruben@rentalia.com via rigodon X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:0(62.37.216.115):SA:0(-2.2/5.0):. Processed in 5.096413 secs Process 18813) Received: from 62-37-216-115.mad1.adsl.uni2.es (HELO ?192.168.2.28?) (ruben@rentalia.com@62.37.216.115) by mail.rentalia.net with SMTP; 12 Jun 2006 16:58:54 +0200 Message-ID: <448D8129.9010302@rentalia.com> Date: Mon, 12 Jun 2006 16:58:49 +0200 From: Ruben Rubio Rey User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060503) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?G=E1briel_=C1kos?= CC: pgsql-performance@postgresql.org Subject: Re: Posrgres speed problem References: <448D7C81.1000108@rentalia.com> <448D7DD9.10400@i-logic.hu> In-Reply-To: <448D7DD9.10400@i-logic.hu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/132 X-Sequence-Number: 19489 Gábriel Ákos wrote: > Ruben Rubio Rey wrote: > >> >> Hi, >> >> Im having a problem with postgres 8.1.3 on a Fedora Core 3 (kernel >> 2.6.9-1.667smp) >> >> I have two similar servers, one in production and another for testing >> purposes. >> Databases are equal (with a difference of some hours) >> >> In the testing server, an sql sentence takes arround 1 sec. >> In production server (low server load) takes arround 50 secs, and >> uses too much resources. >> >> Explain analyze takes too much load, i had to cancel it! >> >> Could it be a it a bug? >> Any ideas? > > > vacuum full analyse the database. > > I use to do it all nights Its an script with content: DIREC=/usr/local/pgsql/bin/ DIRLOGS=/var/log/rentalia LOGBIN=/usr/sbin/cronolog echo "vacuum vacadb..." | $LOGBIN $DIRLOGS/%Y-%m-%d_limpieza.log date | $LOGBIN $DIRLOGS/%Y-%m-%d_limpieza.log $DIREC/vacuumdb -f -v --analyze vacadb 2>&1 | $LOGBIN $DIRLOGS/%Y-%m-%d_limpieza.log echo "reindex database vacadb;" | $DIREC/psql vacadb 2>&1 | $LOGBIN $DIRLOGS/%Y-%m-%d_limpieza.log date | $LOGBIN $DIRLOGS/%Y-%m-%d_limpieza.log No errors or warnings are reported. instead repeating it now, I preffer to wait at tomorrow to check again the logs