X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 14A9ED1B49A for ; Mon, 19 Jan 2004 23:59:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 79839-04 for ; Mon, 19 Jan 2004 19:59:02 -0400 (AST) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id 10F50D1B91A for ; Mon, 19 Jan 2004 19:58:59 -0400 (AST) Received: from tokyo.samurai.com (d226-89-59.home.cgocable.net [24.226.89.59]) by bob.samurai.com (Postfix) with ESMTP id ED0721D96; Mon, 19 Jan 2004 18:58:44 -0500 (EST) To: "scott.marlowe" Cc: Rajesh Kumar Mallah , David Shadovitz , "pgsql-performance@postgresql.org" Subject: Re: COUNT & Pagination From: Neil Conway In-Reply-To: (scott marlowe's message of "Wed, 14 Jan 2004 14:40:01 -0700 (MST)") References: Date: Mon, 19 Jan 2004 18:58:44 -0500 Message-ID: <8765f7ij7v.fsf@mailbox.samurai.com> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/193 X-Sequence-Number: 5367 "scott.marlowe" writes: > Yes, previously run query should be faster, if it fits in kernel > cache. Or the PostgreSQL buffer cache. > Plus, the design of Postgresql is such that it would have to do a > LOT of cache checking to see if there were any updates to the > underlying data between selects. Last I checked (which was a while ago, admittedly), the MySQL design completely purges the query cache for a relation whenever that relation is mentioned in an INSERT, UPDATE, or DELETE. When this was discussed (check the -hackers archives for more), IIRC the consensus was that it's not worth implementing it if we can't do better than that. -Neil