X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 00C82D9806 for ; Sun, 2 Oct 2005 00:26:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38141-06 for ; Sun, 2 Oct 2005 03:26:09 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5A3EBD8EB7 for ; Sun, 2 Oct 2005 00:26:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j923Q7RG029838; Sat, 1 Oct 2005 23:26:07 -0400 (EDT) To: Martijn van Oosterhout Cc: Ron Peacetree , pgsql-hackers@postgresql.org Subject: Re: [PERFORM] A Better External Sort? In-reply-to: <20051001215602.GG13830@svana.org> References: <18329659.1128188552696.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> <20051001215602.GG13830@svana.org> Comments: In-reply-to Martijn van Oosterhout message dated "Sat, 01 Oct 2005 23:56:07 +0200" Date: Sat, 01 Oct 2005 23:26:07 -0400 Message-ID: <29837.1128223567@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/57 X-Sequence-Number: 73916 Martijn van Oosterhout writes: > Anyway, to bring some real info I just profiled PostgreSQL 8.1beta > doing an index create on a 2960296 row table (3 columns, table size > 317MB). 3 columns in the index you mean? What were the column datatypes? Any null values? > The number 1 bottleneck with 41% of user time is comparetup_index. > ... > The thing is, I can't see anything in comparetup_index() that could > take much time. The index_getattr and heap_getattr macros can be annoyingly expensive. regards, tom lane