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 92493529F0 for ; Tue, 28 Jun 2005 17:44:16 -0300 (ADT) 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 44178-08 for ; Tue, 28 Jun 2005 20:44:15 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by svr1.postgresql.org (Postfix) with ESMTP id 3729B529BC for ; Tue, 28 Jun 2005 17:44:13 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id z6so384658nzd for ; Tue, 28 Jun 2005 13:44:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Y903MBHs/jldu4GmE+DQMus6ZjnqRh02WRmk2FEfrPgOR/AR74LlNoVosHbzMpSVlKjZc4+GiJ1ABMdYzdvUXC2/46/ekwXNrCwU/x+xuEFM4rZA9pgBAJWhrSQyCggvI9HnBangps8VTGnzuXhKyavKj8FEeznM7eKAQzNktLM= Received: by 10.36.32.11 with SMTP id f11mr4988279nzf; Tue, 28 Jun 2005 13:43:47 -0700 (PDT) Received: by 10.36.108.17 with HTTP; Tue, 28 Jun 2005 13:43:46 -0700 (PDT) Message-ID: <22455e7050628134348a74d7c@mail.gmail.com> Date: Tue, 28 Jun 2005 13:43:46 -0700 From: Billy extyeightysix Reply-To: Billy extyeightysix To: Postgresql Performance list Subject: Re: optimized counting of web statistics In-Reply-To: <22455e7050628133978b17cd4@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <6EE64EF3AB31D5448D0007DD34EEB3415C2C08@Herge.rcsinc.local> <22455e7050628133978b17cd4@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.54 tagged_above=0 required=5 tests=FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200506/579 X-Sequence-Number: 13216 > The bottleneck in the > whole process is actually counting each data point (how many times a > url was visited, or how many times a url referred the user to the > website). So more specifically I am wondering if there is way to store > and retrieve the data such that it speeds up the counting of the > statistics. This is misleading, the counting is being done by perl. so what is happening is that I am locating all of the rows via a cursor and then calculating the stats using perl hashes. no counting is being in the DB. maybe it would be much faster to count in the db somehow? exty