Received: from gateway.indvalley.com (ptil-134-144-ban.primus-india.net [203.196.144.134] (may be forged)) by postgresql.org (8.11.3/8.11.4) with SMTP id g0ADc9B12826 for ; Thu, 10 Jan 2002 08:38:11 -0500 (EST) (envelope-from guru@indvalley.com) Received: (qmail 3296 invoked from network); 10 Jan 2002 13:37:57 -0000 Received: from unknown (HELO GURU) (192.168.0.20) by 192.168.0.63 with SMTP; 10 Jan 2002 13:37:57 -0000 Date: Thu, 10 Jan 2002 19:03:29 +0530 From: Gurudutt X-Mailer: The Bat! (v1.52f) Reply-To: "Guru(External)" Organization: Indus Valley X-Priority: 3 (Normal) Message-ID: <4423720517.20020110190329@indvalley.com> To: pgsql-sql@postgresql.org Subject: Resources MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/73 X-Sequence-Number: 6163 Hi, I have a pentium III server, running on RHL 7.1 with 256 MB RAM, The following is output of the "top" command for query which involves fetch from a table with about MAX of 10,000 rows. -------------------------------------TOP------------------------------ PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 3174 postgres 19 0 3328 3328 2672 R 99.0 1.3 0:58 postmaster 1199 nobody 9 0 3728 3728 2704 S 0.5 1.4 0:03 httpd 3035 root 10 0 1048 1048 840 R 0.3 0.4 0:15 top 1 root 8 0 544 544 472 S 0.0 0.2 0:04 init 2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd 3 root Now, my question is, it takes ages(2 mints) for the query to run (regularly VACUUM ANALYZED Database) and if you look closely at the resources consumed by the postgres, it is almost taking away 100% CPU time. How can we make it faster and to consume less resources ?? Can anybody suggest the steps they are taking for time-critical applications to run efficiently. Thanks in advance -- Best regards, Gurudutt mailto:guru@indvalley.com Life is not fair - get used to it. Bill Gates