[Pgpool-hackers] cache for pgpool

David Fetter david at fetter.org
Tue May 16 20:40:49 UTC 2006


On Tue, May 16, 2006 at 03:34:34PM -0500, Jim C. Nasby wrote:
> On Tue, May 16, 2006 at 09:35:55PM +0200, Jean-Max Reymond wrote:
> > 2006/5/16, David Boreham <david_list at boreham.org>:
> > 
> > imagine a page with three select count(*) from blabla.  this page
> > is the home page and loaded 2 millions times/day no chance for
> > Postgres :-(
> 
> And do you *really* need an exact, up-to-the-second count on the
> home page? If it's truely just 'SELECT count(*) FROM table', you
> could easily just SELECT reltuples FROM pg_class WHERE
> relname='table', which would be up-to-date as of the last analyze.

Similarly, a materialized view updated by trigger would work, and be
guaranteed good up to the most recent commit. :)  In MySQL, the only
guarantee you get is, "Surprise!  You just lost your data!"

Cheers,
D
-- 
David Fetter <david at fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!


More information about the Pgpool-hackers mailing list