Re: Poor query performance on one of two "like" databases in production. - Mailing list pgsql-general

From Stephen Frost
Subject Re: Poor query performance on one of two "like" databases in production.
Date
Msg-id 20100514223627.GB21875@tamriel.snowman.net
Whole thread Raw
In response to Re: Poor query performance on one of two "like" databases in production.  (<Keaton_Adams@McAfee.com>)
List pgsql-general
* Keaton_Adams@McAfee.com (Keaton_Adams@McAfee.com) wrote:
> It looks like it is just a difference in data volume.  We are re-working the query to see what that will do.

Just my 2c, but I'd recommend using JOIN syntax instead of comma-joins.
eg:

select * from a JOIN b USING (col1,col2);

or:

select * from a JOIN b ON (a.col1 = b.col2);

Would make the query alot easier to read, imv.  Also, those UNION ALLs
probably aren't really helping this whole situation..  Perhaps you could
move them out of the FROM clause and just have a simpler query for each
set which is *then* UNION ALL'd together.

    THanks,

        Stephen

    Thanks,

        Stephen

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Persistence problem
Next
From: Joao Ferreira gmail
Date:
Subject: Re: autovacuum: 50% iowait for hours