Received: from smtp-1.ig.com.br (smtp-1.ig.com.br [200.225.157.60] (may be forged)) by postgresql.org (8.11.3/8.11.1) with SMTP id f34HF8858323 for ; Wed, 4 Apr 2001 13:15:08 -0400 (EDT) (envelope-from edipoelder@ig.com.br) Message-Id: <200104041715.f34HF8858323@postgresql.org> Received: (qmail 27779 invoked from network); 4 Apr 2001 17:15:07 -0000 Received: from webmail-3.ig.com.br (HELO localhost) (200.225.157.81) by smtp-1.ig.com.br with SMTP; 4 Apr 2001 17:15:07 -0000 Date: Wed, 4 Apr 2001 14:15:05 -0300 To: pgsql-sql@postgresql.org From: edipoelder@ig.com.br Cc: Subject: Memory and performance X-Originating-IP: [200.225.157.81]200.19.161.175 X-Mailer: InMail by Insite - www.insite.com.br X-user: edipoelder@ig.com.br MIME-Version: 1.0 Content-type: Multipart/Mixed; boundary=Message-Boundary-986404505 X-Archive-Number: 200104/52 X-Sequence-Number: 2391 --Message-Boundary-986404505 Content-type: text/plain; charset=US-ASCII Content-description: Mail message body Content-transfer-encoding: 7BIT Hi all, I have noted that Postgresql don't make a good memory handle. I have made the tables/procedure (in attached file) and run it as "select bench(10, 5000)". This will give a 50000 records inserts (5 x 10000). (well, I run it on a P200+64MB of RAM, under Linux, and Postgres 7.0.2. In a more powerfull machine, you can try other values). I get as result, the following times: id | objname | benchtime ----+---------+----------- 1 | group 1 | 00:00:32 2 | group 2 | 00:00:47 3 | group 3 | 00:01:13 4 | group 4 | 00:01:41 5 | group 5 | 00:02:08 (5 rows) Note that, with memory increse, the system becomes slow, even if the system has free memory to alocate (yes, 64MB is enough to this test). I didn't see the source code (yet), but I think that the data estructure used to keep the changed records is a kind of chained list; and to insert a new item, you have to walk to the end of this list. Can it be otimized? The system that I'm developing, I have about 25000 (persons) x 8 (exams) x 15 (answers per exam) = 3000000 records to process and it is VERY SLOW. thanks, Edipo Elder [edipoelder@ig.com.br] _________________________________________________________ Oi! Você quer um iG-mail gratuito? Então clique aqui: http://www.ig.com.br/paginas/assineigmail.html --Message-Boundary-986404505 Content-type: application/octet-stream; name="teste.zip"; type=Unknown Content-description: teste.zip Content-transfer-encoding: BASE64 Content-disposition: attachment UEsDBBQAAAAIAJNIhCopH/Fu1gEAAG8FAAAJABUAdGVzdGUuc3FsVVQJAAPW Dcs6HCfLOlV4BADuA+4DlVPBbpwwED3DV8yhFVBtoybHRf2WyuBZ4o2xydhE WikfnwGDwWTVphdk3njevHkzlmQH8KLRCKIjOw513hIKjwlYKgnKeOyQTuBs j1J4sSEDqV7QDV7wBny1quo8lztiNzZ3uVc8oVdyxv6jXsyZCgvtkY4FQEgJ F0uoOrNmhQwgvCChadFFA/baGw49e9XjQXvEE+22uRrRI7wJap8FlU+/qtN2 FabPX9y6jKb1ypqQUW6OhEMVJfzrIjflRzJuLsguQJFLbLUgzDPzZ3FEKw6w J/DtsZ7gzast8sQR5wX5KJ8BNHL/G+Pc1MsKtiPREVOrPj5ft3ODnTJ5JlHj 1BrZfr8wKX4P3E0oc4y3fi5oL1Lcyup8nn5YYz+E41TYQhT9qYHz7yQ42TAJ h8eHh9U6be2QZ5kyDskHvqAsLOO6rxWvgR55r0p1AhJG2r6sfiwkPMxsJr9G 8jiAhT8tEKP7hb9X7MrRpN6aOZfk4c380/nLbu2nuZDMQfYqGfRPSLysDyZt D2HuYXksuweSOFYUod+ieH/n36Xm3MSniR0FklAOwVivWmSC5dkEvu9FwQ6F PV6t+LITiwpOCU9sBfat1zmDdQFamG4UHQsY9NC5V13U+QdQSwECFwMUAAAA CACTSIQqKR/xbtYBAABvBQAACQANAAAAAAABAAAAtIEAAAAAdGVzdGUuc3Fs VVQFAAPWDcs6VXgAAFBLBQYAAAAAAQABAEQAAAASAgAAAAA= --Message-Boundary-986404505--