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