Received: from lists.unixathome.org (lists.unixathome.org [210.48.103.158]) by postgresql.org (Postfix) with ESMTP id 0ED184769B9 for ; Wed, 27 Feb 2002 16:31:28 -0500 (EST) Received: from wocker (lists.unixathome.org [210.48.103.158]) by lists.unixathome.org (8.11.6/8.11.6) with ESMTP id g1RLV7k94868; Thu, 28 Feb 2002 10:31:07 +1300 (NZDT) (envelope-from dan@lists.unixathome.org) Message-Id: <200202272131.g1RLV7k94868@lists.unixathome.org> From: "Dan Langille" Organization: DVL Software Limited To: wweng@kencast.com Date: Wed, 27 Feb 2002 16:30:58 -0500 MIME-Version: 1.0 Subject: Re: How slow is DISTINCT? Reply-To: dan@langille.org Cc: pgsql-sql@postgresql.org In-reply-to: <3C7D252A.3030608@kencast.com> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Archive-Number: 200202/442 X-Sequence-Number: 6863 On 27 Feb 2002 at 13:27, Wei Weng wrote: > I tend to use DISTINCT a lot in my queries to limit the repeated rows. Is > that a good habbit? If that's what you need, use it. > How exactly slow is DISTINCT being processed in SQL engines? (not > limited to postgresql, though comments on postgresql would be most > relevant) Try it. Compare the same SQL with and without DISTINCT. -- Dan Langille The FreeBSD Diary - http://freebsddiary.org/ - practical examples