X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2C3BA329EB4 for ; Thu, 7 Oct 2004 18:26:47 +0100 (BST) 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 41438-08 for ; Thu, 7 Oct 2004 17:26:44 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1DEA0329E94 for ; Thu, 7 Oct 2004 18:26:44 +0100 (BST) 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 i97HQfej000200; Thu, 7 Oct 2004 13:26:41 -0400 (EDT) To: Ole Langbehn Cc: =?iso-8859-15?q?Pierre-Fr=E9d=E9ric_Caillaud?= , pgsql-performance@postgresql.org Subject: Re: sequential scan on select distinct In-reply-to: <200410071921.08685.ole@freiheit.com> References: <200410061130.58625.ole@freiheit.com> <29194.1097091506@sss.pgh.pa.us> <200410071921.08685.ole@freiheit.com> Comments: In-reply-to Ole Langbehn message dated "Thu, 07 Oct 2004 19:21:08 +0200" Date: Thu, 07 Oct 2004 13:26:41 -0400 Message-ID: <199.1097170001@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/86 X-Sequence-Number: 8562 Ole Langbehn writes: >> What do you think about the idea of an "UniqueSort" which would do >> sort+unique in one pass ? > This is what oracle does and it is quite fast with it... Hashing is at least as fast, if not faster. regards, tom lane