From: Robert Treat <xzilla@users.sourceforge.net>
To: Rhaoni Chiu Pereira <rhaoni@sistemica.info>
Cc: Lista PostgreSQL <pgsql-admin@postgresql.org>
Subject: Re: Query to slow
Date: 25 Aug 2003 09:21:52 -0400
Message-ID: <1061817712.3390.212.camel@camel> (raw)
In-Reply-To: <1061813837.3f49fe4d20844@sistemica.info>
References: <1061813837.3f49fe4d20844@sistemica.info>
On Mon, 2003-08-25 at 08:17, Rhaoni Chiu Pereira wrote:
> Hi List,
>
> As I said before, I'm not a DBA " yet" , but I'm learning ... and I
> already have a PostgreSQL running, so I have to ask some help...
> I got a SQL as folows :
>
<snip>
>
> I have created the decode, NVL and DIVIDE functions.... the problem is that the
> where condition makes this query to slow ( about 4 min ) and the same query in
> my Oracle database takes less than 40 seconds. I have tried to isolate the
> problem taking off some fields and I left justa the two first fields in the
> query ( ftnfco00.estado_cliente , ftcofi00.grupo_faturamento ) and it still
> taking almost 4 min to return. Does anyone have a hint to give me to make it
> faster ?
>
Make sure you have run vacuum analyze on your database, if it is still
slow post "explain analyze <query>" to pgsql-performance mailing list
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: xzilla@users.sourceforge.net, rhaoni@sistemica.info
Subject: Re: Query to slow
In-Reply-To: <1061817712.3390.212.camel@camel>
References: <1061813837.3f49fe4d20844@sistemica.info> <1061817712.3390.212.camel@camel>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox