Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 428609FBED9 for ; Fri, 3 Aug 2007 11:26:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 19323-01-3 for ; Fri, 3 Aug 2007 11:26:02 -0300 (ADT) X-Greylist: delayed 00:08:08.065567 by SQLgrey-1.7.5 Received: from supernews.unixathome.org (supernews.unixathome.org [216.168.29.4]) by postgresql.org (Postfix) with ESMTP id A4C499FB458 for ; Fri, 3 Aug 2007 11:26:11 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by supernews.unixathome.org (Postfix) with ESMTP id 6989A1702E; Fri, 3 Aug 2007 10:18:01 -0400 (EDT) X-Virus-Scanned: amavisd-new at unixathome.org Received: from supernews.unixathome.org ([127.0.0.1]) by localhost (supernews.unixathome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 44nh67Q+UX77; Fri, 3 Aug 2007 10:17:59 -0400 (EDT) Received: from bast.unixathome.org (bast.unixathome.org [76.110.86.209]) by supernews.unixathome.org (Postfix) with ESMTP id 40D251702A; Fri, 3 Aug 2007 10:17:59 -0400 (EDT) Received: from [10.55.0.99] (wocker.unixathome.org [10.55.0.99]) by bast.unixathome.org (Postfix) with ESMTP id CDF9EB883; Fri, 3 Aug 2007 10:17:58 -0400 (EDT) From: "Dan Langille" To: "Sven Clement" Date: Fri, 03 Aug 2007 10:17:58 -0400 MIME-Version: 1.0 Subject: Re: Performance problems with large telemetric datasets on 7.4.2 CC: pgsql-performance@postgresql.org Message-ID: <46B300D6.23687.147A9B8B@dan.langille.org> In-reply-to: <881035ea0708030652r37b25a86g61e88e1f5e95eab2@mail.gmail.com> References: <881035ea0708030652r37b25a86g61e88e1f5e95eab2@mail.gmail.com> X-mailer: Pegasus Mail for Windows (4.41) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/20 X-Sequence-Number: 26150 On 3 Aug 2007 at 6:52, Sven Clement wrote: > Hello everybody, > > as I'm new to this list I hope that it is the right place to post this > and also the right format, so if I'm committing an error, I apologize > in advance. > > First the background of my request: > > I'm currently employed by an enterprise which has approx. 250 systems > distributed worldwide which are sending telemetric data to the main > PostgreSQL. The remote systems are generating about 10 events per > second per system which accumulates to about 2500/tps. The data is > stored for about a month before it is exported and finally deleted > from the database. On the PostgreSQL server are running to databases > one with little traffic (about 750K per day) and the telemetric > database with heavy write operations all around the day (over 20 > million per day). We already found that the VACUUM process takes > excessively long and as consequence the database is Vacuumed > permanently. > > The hardware is a IBM X306m Server, 3.2 GHz HT (Pentium IV), 1 GB RAM > and 2x 250 GB HDD (SATA-II) with ext3 fs, one of the HDD is dedicated > to database. OS is Debian 3.1 Sarge with PostgreSQL 7.4.7 > (7.4.7-6sarge1) with the libpq frontend library. > > Now the problem: > > The problem we are experiencing is that our queries are slowing down > continuously even if we are performing queries on the index which is > the timestamp of the event, a simple SELECT query with only a simple > WHERE clause (< or >) takes very long to complete. So the database > becomes unusable for production use as the data has to be retrieved > very quickly if we want to act based on the telemetric data. Have you confirmed via explain (or explain analyse) that the index is being used? > So I'm asking me if it is useful to update to the actual 8.2 version > and if we could experience performance improvement only by updating. There are other benefits from upgrading, but you may be able to solve this problem without upgrading. -- Dan Langille - http://www.langille.org/ Available for hire: http://www.freebsddiary.org/dan_langille.php