From: Rod Taylor <rbt@rbt.ca>
To: toby@lyricist.com.au
Cc: pgsql-sql@postgresql.org
Subject: Re: join optimization problem
Date: 03 Aug 2003 09:04:11 -0400
Message-ID: <1059915851.43336.208.camel@jester> (raw)
In-Reply-To: <200308032021.45212.toby@lyricist.com.au>
References: <200307281412.36981.toby@lyricist.com.au>
<1059698003.33557.5.camel@jester>
<200308032021.45212.toby@lyricist.com.au>
> 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!
Attachments:
signature.asc (application/pgp-signature, 186B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rbt@rbt.ca, toby@lyricist.com.au
Subject: Re: join optimization problem
In-Reply-To: <1059915851.43336.208.camel@jester>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox