Re: join optimization problem

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: join optimization problem
Дата
Msg-id 1059915851.43336.208.camel@jester
обсуждение исходный текст
Ответ на join optimization problem  (Toby Tremayne <toby@lyricist.com.au>)
Список pgsql-sql
>     thanks for that - I tried it out, fixed the minor typos and it ran at almost
> the same speed!  Any other ideas?

Could you post an explain analyze for both queries?


There is always an application change.  Add a trigger onto msg that will
bump the date and count on msg_sum when a msg is added.  This will
support virtually unlimited msg table growth (any aggregate will
eventually be slow on a large table).

Just be sure to vacuum the msg_sum table regularly (once per 25%
turnover) -- possibly as often as once a minute!



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

Предыдущее
От: "A.Bhuvaneswaran"
Дата:
Сообщение: Re: Efficient deletions?
Следующее
От: Toby Tremayne
Дата:
Сообщение: Re: join optimization problem