Re: join optimization problem - Mailing list pgsql-sql

From Rod Taylor
Subject Re: join optimization problem
Date
Msg-id 1059915851.43336.208.camel@jester
Whole thread Raw
In response to join optimization problem  (Toby Tremayne <toby@lyricist.com.au>)
List 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 by date:

Previous
From: "A.Bhuvaneswaran"
Date:
Subject: Re: Efficient deletions?
Next
From: Toby Tremayne
Date:
Subject: Re: join optimization problem