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 EF3D0529A1 for ; Tue, 28 Jun 2005 21:20:05 -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 88690-06 for ; Wed, 29 Jun 2005 00:19:55 +0000 (GMT) Received: from hummer.onthenet.com.au (hummer.onthenet.com.au [203.13.68.9]) by svr1.postgresql.org (Postfix) with ESMTP id 8BD3F529B8 for ; Tue, 28 Jun 2005 21:19:54 -0300 (ADT) Received: from [127.0.0.1] (imp5.dsl.onthenet.net [203.144.16.135]) by hummer.onthenet.com.au (Postfix) with ESMTP id 4B4FC1A0B2C for ; Wed, 29 Jun 2005 10:19:56 +1000 (EST) Message-ID: <42C2D7B5.4070707@wildcash.com> Date: Wed, 29 Jun 2005 10:17:41 -0700 From: Rudi Starcevic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Postgresql Performance list Subject: Re: optimized counting of web statistics References: <6EE64EF3AB31D5448D0007DD34EEB3415C2C08@Herge.rcsinc.local> <22455e7050628133978b17cd4@mail.gmail.com> In-Reply-To: X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.329 tagged_above=0 required=5 tests=DATE_IN_FUTURE_12_24 X-Spam-Level: ** X-Archive-Number: 200506/582 X-Sequence-Number: 13219 Hi, >I do my batch processing daily using a python script I've written. I >found that trying to do it with pl/pgsql took more than 24 hours to >process 24 hours worth of logs. I then used C# and in memory hash >tables to drop the time to 2 hours, but I couldn't get mono installed >on some of my older servers. Python proved the fastest and I can >process 24 hours worth of logs in about 15 minutes. Common reports run >in < 1 sec and custom reports run in < 15 seconds (usually). > > When you say you do your batch processing in a Python script do you mean a you are using 'plpython' inside PostgreSQL or using Python to execut select statements and crunch the data 'outside' PostgreSQL? Your reply is very interesting. Thanks. Regards, Rudi.