Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C0DD14759A8 for ; Sun, 11 Aug 2002 00:24:25 -0400 (EDT) Received: from ferda.ied.com (xtreme10-98.aci.on.ca [209.50.81.98]) by postgresql.org (Postfix) with ESMTP id 10944475178 for ; Sun, 11 Aug 2002 00:24:25 -0400 (EDT) Received: from [127.0.0.2] (localhost.localdomain [127.0.0.1]) by ferda.ied.com (8.11.6/8.11.6) with ESMTP id g7B4MoR09124 for ; Sun, 11 Aug 2002 00:22:50 -0400 Date: Sun, 11 Aug 2002 00:22:49 -0400 (EDT) From: h012@ied.com To: pgsql-sql@postgresql.org Subject: slowing down too fast - why ? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/180 X-Sequence-Number: 9026 Hi, I must be doing something silly. I have a 900MHz, 384MB RAM, and this thing is slow. (Postgresql-7.1.2). And growing exponencially slower. SQL: http://John.Vicherek.com/slow/schema.sql (save to /tmp/schema.sql) am.dat: http://John.Vicherek.com/slow/am.dat (save to /tmp/am.dat ) perl: http://John.Vicherek.com/slow/rpm2filerian.pl (save to /tmp/rpm2filerian.pl) when I do : createdb filerian psql -d filerian -f /tmp/schema.sql echo 'create table times (the_moment datetime, the_number int4);' | psql -d filerian cd /tmp/mdk/8.2/i586/Mandrake/RPMS # lots of RPMs here while sleep 10 ; do echo 'insert into times values( now(), count(file.id));' | psql -d filerian ; done 2>&1 >/dev/null & for i in *.rpm ; do echo $i ; perl /tmp/rpm2filerian.pl 0 $i ; done Why are the times so bad ? Why is it slowing so fast ? Am I missing any useful indeces ? This shows the slowage: select the_number,min(the_moment) from times group by the_number; PS: if you look in the perl code for "exec", immediatelly above will you find the query it is doing. Thanx, John -- -- Gospel of Jesus is the saving power of God for all who believe -- ## To some, nothing is impossible. ## http://Honza.Vicherek.com/