Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 432192E2EB6 for ; Wed, 5 Mar 2008 06:27:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 31847-06 for ; Wed, 5 Mar 2008 06:27:05 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by postgresql.org (Postfix) with ESMTP id 4CDB82E2EAE for ; Wed, 5 Mar 2008 06:27:10 -0400 (AST) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JWqq4-0003Hx-L6 for pgsql-performance@postgresql.org; Wed, 05 Mar 2008 02:27:08 -0800 Message-ID: <15847165.post@talk.nabble.com> Date: Wed, 5 Mar 2008 02:27:08 -0800 (PST) From: SPMLINGAM To: pgsql-performance@postgresql.org Subject: postgresql performance MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: spmlingam@gmail.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.587 tagged_above=0 required=5 tests=DNS_FROM_OPENWHOIS=2.431, WHOIS_MYPRIVREG=0.156 X-Spam-Level: ** X-Archive-Number: 200803/69 X-Sequence-Number: 29023 Dear Friends, I have a table with 50 lakhs records, the table has more then 10 fields, i have primary key, i have select query with count(*) without any condition, it takes 17 seconds. I have another one query which will do joins with other small tables, it takes 47 seconds to give output, the result has 2 lakhs records. the indexing is not used. I have created one index with one field ( which i used in this query, the field value has duplicates also ). Now the cpu usage is 4.4%, and waiting for io process . i have checked the above in the top command. If i delete that index, then it works fine, now the cpu usage takes more then 70%, and waiting shows less then 30%. Can Anyone explain, Why postgres behaves like this. -- View this message in context: http://www.nabble.com/postgresql-performance-tp15847165p15847165.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com.