X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B6CDF9F9ED6 for ; Thu, 22 Jun 2006 12:40:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 96124-10 for ; Thu, 22 Jun 2006 12:40:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E818C9F9FE3 for ; Thu, 22 Jun 2006 12:40:11 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5MFe8wN000210; Thu, 22 Jun 2006 11:40:08 -0400 (EDT) To: "Ravindra Guravannavar" cc: pgsql-admin@postgresql.org Subject: Re: clustering takes too long! In-reply-to: <5d141cb10606180145y2d1b8f18m8d855aa77fbbd05d@mail.gmail.com> References: <5d141cb10606180145y2d1b8f18m8d855aa77fbbd05d@mail.gmail.com> Comments: In-reply-to "Ravindra Guravannavar" message dated "Sun, 18 Jun 2006 14:15:57 +0530" Date: Thu, 22 Jun 2006 11:40:08 -0400 Message-ID: <209.1150990808@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/202 X-Sequence-Number: 22164 "Ravindra Guravannavar" writes: > I am trying to cluster an index on the TPC-H lineitem table having > 6 million records. The index is on a single column l_suppkey. Postgres > (8.1.3) is not able to finish the operation even after 2 hours! The disk > is being accessed continuously and CPU is at 2%. Postmaster is > started with the following options: > -B 2000 --work-mem=10240 --maintenance_work_mem=10240 --wal_buffers=32 > --checkpoint_segments=128 --checkpoint_timeout=600 You should increase maintenance_work_mem for large reindexing operations. That shared_buffers setting is about a factor of 10 too small too. regards, tom lane