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 F31B79FA430 for ; Mon, 12 Jun 2006 12:02:47 -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 61679-08 for ; Mon, 12 Jun 2006 12:02:41 -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 2A6449FA42B for ; Mon, 12 Jun 2006 12:02:41 -0300 (ADT) Received: (qmail 26032 invoked by uid 514); 12 Jun 2006 17:02:38 +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.094653 secs); 12 Jun 2006 15:02:38 -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.094653 secs Process 25838) 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 17:02:32 +0200 Message-ID: <448D8204.80303@rentalia.com> Date: Mon, 12 Jun 2006 17:02:28 +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: "Jonah H. Harris" CC: pgsql-performance@postgresql.org Subject: Re: Posrgres speed problem References: <448D7C81.1000108@rentalia.com> <36e682920606120749l7da92ff8k6b9f702029cd5d3a@mail.gmail.com> In-Reply-To: <36e682920606120749l7da92ff8k6b9f702029cd5d3a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/133 X-Sequence-Number: 19490 Jonah H. Harris wrote: > On 6/12/06, Ruben Rubio Rey wrote: > >> I have two similar servers, one in production and another >> for testing purposes. In testing server ~1sec ... in >> production ~50 secs > > > What ver of PostgreSQL? Version 8.1.3 > Same ver on both systems? Yes > Are there any > locks currently held on the resources needed in your Production > environment? How to check it? > Have you analyzed both databases? I have restores testing server today. Full Analyce included. Production server all nights is done. (i have posted the script in other message to the mailing list) > Any sequential scans > running? In the table, there is several scans. vacadb=# \d grupoforo Table "public.grupoforo" Column | Type | Modifiers ------------------+-----------------------------+--------------------------------------------------------------- idmensaje | integer | not null default nextval('grupoforo_idmensaje_seq'::regclass) idusuario | integer | not null idgrupo | integer | not null idmensajetema | integer | not null default -1 mensaje | character varying(4000) | asunto | character varying(255) | not null fechalocal | timestamp without time zone | default now() webenabled | integer | not null default 1 por | character varying(255) | estadocomentario | character(1) | default 'D'::bpchar idlenguaje | character(2) | default 'ES'::bpchar fechacreacion | timestamp without time zone | default now() hijos | integer | hijoreciente | timestamp without time zone | valoracion | integer | default 0 codigo | character varying(100) | Indexes: "pk_grupoforo" PRIMARY KEY, btree (idmensaje) "grupoforo_asunto_idx" btree (asunto) "grupoforo_codigo_idx" btree (codigo) "grupoforo_estadocomentario_idx" btree (estadocomentario) "grupoforo_idgrupo_idx" btree (idgrupo) "grupoforo_idlenguaje_idx" btree (idlenguaje) "grupoforo_idmensajetema_idx" btree (idmensajetema) "grupoforo_idusuario_idx" btree (idusuario) "idx_grupoforo_webenabled" btree (webenabled) > If so, have you vacuumed? Yes. > > Send the explain analyze from your test database. Tomorrow morning i ll send it ... now it could be a disaster ... > >