Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B90EA9FA376; Sat, 11 Nov 2006 04:18:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 06585-06; Sat, 11 Nov 2006 08:18:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 91AF49FA240; Sat, 11 Nov 2006 04:18:27 -0400 (AST) thread-index: AccFafeYkNg8N1GHSv+S1M+xr7yevg== Received: from [192.168.0.31] ([84.12.80.212]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.1830); Sat, 11 Nov 2006 03:18:28 -0500 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 Content-class: urn:content-classes:message Importance: normal Subject: Re: [PERFORM] BUG #2737: hash indexing large table fails, while btree of same index works From: "Simon Riggs" To: "Tom Lane" Cc: "Balazs Nagy" , , In-Reply-To: <7530.1163202951@sss.pgh.pa.us> References: <200611051347.kA5DlVCk032222@wwwmaster.postgresql.org> <7530.1163202951@sss.pgh.pa.us> Content-Type: text/plain; charset="iso-8859-1" Date: Sat, 11 Nov 2006 08:17:54 +0000 Message-ID: <1163233075.3634.944.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Nov 2006 08:18:28.0625 (UTC) FILETIME=[F78CC010:01C70569] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/84 X-Sequence-Number: 16219 On Fri, 2006-11-10 at 18:55 -0500, Tom Lane wrote: > [ cc'ing to pgsql-performance because of performance issue for hash indexes ] > > "Balazs Nagy" writes: > > Database table size: ~60 million rows > > Field to index: varchar 127 > > > CREATE INDEX ... USING hash ... I'd be interested in a performance test that shows this is the best way to index a table though, especially for such a large column. No wonder there is an 8GB index. > One thought that comes to mind is to require hash to do an smgrextend() > addressing the last block it intends to use whenever it allocates a new > batch of blocks, whereupon md.c could adopt a saner API: allow > smgrextend but not other calls to address blocks beyond the current EOF. > Thoughts? Yes, do it. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com