Re: Poor query performance on one of two "like" databases in production.

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Poor query performance on one of two "like" databases in production.
Дата
Msg-id 20100514223627.GB21875@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Poor query performance on one of two "like" databases in production.  (<Keaton_Adams@McAfee.com>)
Список 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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Persistence problem
Следующее
От: Joao Ferreira gmail
Дата:
Сообщение: Re: autovacuum: 50% iowait for hours