X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C589A11F6622 for ; Wed, 29 Mar 2006 09:48:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39476-08 for ; Wed, 29 Mar 2006 09:48:25 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by postgresql.org (Postfix) with ESMTP id 7CFCB11F6654 for ; Wed, 29 Mar 2006 09:48:23 -0400 (AST) Received: by zproxy.gmail.com with SMTP id l1so170441nzf for ; Wed, 29 Mar 2006 05:48:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=D8aZSpE2qdXsuiUjpv4EkTcn39xzy1WmO541tAkH1tasiiE9m18BAPoY81dvDfEngCyBlZxzTqmD4H8xRwCUf/J/IuuG4xJABwErlHEXrWfcPrwxZfabyAdwq6sAAxm8PWHB6KZeDxhJfySXF8T8NjK9g63oqTtOC0CC0GoqdNw= Received: by 10.65.232.18 with SMTP id j18mr504637qbr; Wed, 29 Mar 2006 05:48:22 -0800 (PST) Received: by 10.65.135.6 with HTTP; Wed, 29 Mar 2006 05:48:22 -0800 (PST) Message-ID: Date: Wed, 29 Mar 2006 08:48:22 -0500 From: "Merlin Moncure" To: "Jim C. Nasby" Subject: Re: Decide between Postgresql and Mysql (help of Cc: PFC , "Scott Marlowe" , Marcos , pgsql-performance@postgresql.org In-Reply-To: <20060328215608.GA75181@pervasive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1143559902.1241.16.camel@servidor> <1143572392.3625.79.camel@state.g2switchworks.com> <20060328215608.GA75181@pervasive.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.157 required=5 tests=[AWL=0.157] X-Spam-Score: 0.157 X-Spam-Level: X-Archive-Number: 200603/582 X-Sequence-Number: 18019 On 3/28/06, Jim C. Nasby wrote: > Heh, too quick on the send button... > > On Tue, Mar 28, 2006 at 09:42:51PM +0200, PFC wrote: > Actually, it's entirely possible to do stuff like web counters, you just > want to do it differently in PostgreSQL. Simply insert into a table > every time you have a hit, and then roll that data up periodically. > > And using MyISAM is no panacea, either. Trying to keep a web counter in > a MyISAM table means you'll serialize every web page on that counter > update. if you want raw speed, use a sequence for a hit-counter. sequences are wonder-tools and very lightweight. Explain analyze for a sequence nextval on my desktop box reports 47 microseconds. thats 200k sequence updates/second. insert into a table (fsync off/cache write, no keys) is not much slower. PostgreSQL 8.1 saw a lot of performance improvements...but the most important (and least publicized) is the reduced latency of simple queries in high cache enviroments. merlin