X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 581EF329F45 for ; Mon, 27 Sep 2004 21:33:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31264-05 for ; Mon, 27 Sep 2004 20:33:04 +0000 (GMT) Received: from bayswater1.ymogen.net (host-154-240-27-217.pobox.net.uk [217.27.240.154]) by svr1.postgresql.org (Postfix) with ESMTP id 57A8B329CD9 for ; Mon, 27 Sep 2004 21:33:06 +0100 (BST) Received: from [82.68.132.233] (82-68-132-233.dsl.in-addr.zen.co.uk [82.68.132.233]) by bayswater1.ymogen.net (Postfix) with ESMTP id 59BC99EA7A; Mon, 27 Sep 2004 21:33:05 +0100 (BST) Message-ID: <41587867.4090505@ymogen.net> Date: Mon, 27 Sep 2004 21:30:31 +0100 From: Matt Clark User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rod Taylor Cc: 'Aaron Werman' , 'Scott Kirkwood' , Postgresql Performance Subject: Re: Caching of Queries References: <00e801c4a4b6$5526dd30$8300a8c0@solent> <1096306670.40463.173.camel@jester> In-Reply-To: <1096306670.40463.173.camel@jester> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/295 X-Sequence-Number: 8423 >It might be easiest to shove the caching logic into pgpool instead. > >... > >When pg_pool is told to cache a query, it can get a table list and >monitor for changes. When it gets changes, simply dumps the cache. > > > > It's certainly the case that the typical web app (which, along with warehouses, seems to be one half of the needy apps), could probably do worse than use pooling as well. I'm not well up enough on pooling to know how bulletproof it is though, which is why I included it in my list of things that make me go 'hmm....'. It would be really nice not to have to take both things together. More to the point though, I think this is a feature that really really should be in the DB, because then it's trivial for people to use. Taking an existing production app and justifying a switch to an extra layer of pooling software is relatively hard compared with grabbing data from a view instead of a table (or setting a variable, or adding a tweak to a query, or however else it might be implemented). Eminiently doable in pgpool though, and just the right thing for anyone already using it. M