Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 548DE2E0078 for ; Mon, 24 Mar 2008 22:13:34 -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 89461-04 for ; Mon, 24 Mar 2008 22:13:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by postgresql.org (Postfix) with ESMTP id D230F2E0076 for ; Mon, 24 Mar 2008 22:13:29 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id m38so3752784waf.5 for ; Mon, 24 Mar 2008 18:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YhlFm4NKGs09fYIGMjHuRWVFud+lfETmTczzOfHUo7U=; b=lQiY7vpvh/NA1qWf/vFG5lEOKzC4y/NH/efVCF9uKdU+BcHLklHGscYW4QnmDzD9BQ1UvZMmmRYQyPxuULGWFLWRXOOYnKWJYAtTf7pCnBCVX+4QaY6JPP32nW5xkIdx0YQ+nZYuuQSS2wcu7jsSTfV3RbZUdOak5dwyS2qLo38= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UdSUxwdwhTUfiinanU+2A6laa9UWJ7u4/2w0RUUYEf1UoUyMgi+QJdhm83T/BO23o+NsDoLWkia7rnzZt/zFV5+ArCyjR//fJHDZVLatBore2GEIQdjDtqIetBlltOnUfFW6+cGOGCSsBSVQ40It19LU1ULZO09207ZT6w3xbGU= Received: by 10.114.121.1 with SMTP id t1mr13087044wac.55.1206407608568; Mon, 24 Mar 2008 18:13:28 -0700 (PDT) Received: by 10.114.137.7 with HTTP; Mon, 24 Mar 2008 18:13:28 -0700 (PDT) Message-ID: Date: Mon, 24 Mar 2008 19:13:28 -0600 From: "Scott Marlowe" To: "petchimuthu lingam" Subject: Re: waiting for harddisk Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/455 X-Sequence-Number: 29409 On Mon, Mar 24, 2008 at 7:05 AM, petchimuthu lingam wrote: > i am using postgresql 8.1.8, > > Following configurations: > shared_buffers = 5000 > work_mem = 65536 > maintenance_work_mem = 65536 > effective_cache_size = 16000 > random_page_cost = 0.1 That number, 0.1 is not logical. anything below 1.0 is generally a bad idea, and means that you've got some other setting wrong. > The cpu is waiting percentage goes upto 50%, and query result comes later, > > i am using normal select query ( select * from table_name ). > > table has more then 6 million records. You need faster disks if you want sequential scans to go faster. Look into a decent RAID controller (Areca, Escalade (forgot what they're called now) or LSI) with battery backed cache. Run RAID-10 on it with as many drives as you can afford to throw at the problem.