Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 076F79FB60E for ; Thu, 19 Apr 2007 19:52:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 18821-05 for ; Thu, 19 Apr 2007 19:52:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from weatherbeeta.com.au (218-214-212-153.people.net.au [218.214.212.153]) by postgresql.org (Postfix) with SMTP id 15B149FB5DE for ; Thu, 19 Apr 2007 19:52:19 -0300 (ADT) Received: (qmail 4196 invoked from network); 19 Apr 2007 22:52:17 -0000 X-NetworkBox-HamSign: 0101;OUT;wbeetaau1;2992e41e6a5bc23223c6db9f9d3c9331; Received: from mail.weatherbeeta.com.au (10.10.0.2) by network-box.weatherbeeta.com.au with SMTP; 19 Apr 2007 22:52:17 -0000 Received: (qmail 28835 invoked by uid 1166); 20 Apr 2007 08:52:12 +1000 Received: from 172.20.0.155 by mail.weatherbeeta.com.au (envelope-from , uid 1165) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.6/2315. perlscan: 1.25-st-qms. Clear:RC:1(172.20.0.155):. Processed in 0.247129 secs); 19 Apr 2007 22:52:12 -0000 X-Antivirus-mail.weatherbeeta.com.au-Mail-From: phillip.smith@weatherbeeta.com.au via mail.weatherbeeta.com.au X-Antivirus-mail.weatherbeeta.com.au: 1.25-st-qms (Clear:RC:1(172.20.0.155):. Processed in 0.247129 secs Process 28822) Received: from it-phil.weatherbeeta.com.au (HELO wbaus090) (172.20.0.155) by mail.weatherbeeta.com.au with SMTP; 20 Apr 2007 08:52:11 +1000 From: "Phillip Smith" To: "'Stuart McGraw'" , Subject: Re: slowness when subselect uses DISTINCT Date: Fri, 20 Apr 2007 08:52:00 +1000 Organization: Weatherbeeta Pty Ptd Message-ID: <001d01c782d5$5726bd30$9b0014ac@wbaus090> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Scanned-By-wbeetaau1: Virus scan performed by network-box X-Scanned-By-wbeetaau1: Scanner file id is wbeetaau1-1177023137.48-4181-000 X-Scanned-By-wbeetaau1: No known viruses found in message (received+scanned in 0.02/0.18 secs) X-Scanned-By-wbeetaau1: Spam-Check-Result: No, hits=0 required=7 tests= autolearn=no version=2.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/169 X-Sequence-Number: 28169 Let's start with one, and whatever is causing it in one, is perhaps in theory, causing the rest :) Cheers, ~p -----Original Message----- From: pgsql-sql-owner@postgresql.org = [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Stuart McGraw Sent: Friday, 20 April 2007 00:20 To: pgsql-sql@postgresql.org Subject: Re: [SQL] slowness when subselect uses DISTINCT Phillip Smith wrote: > May I suggest you post an EXPLAIN ANALYZE to the group for the query you're > having problems with...? I will do that but it has happened to me enough that it seems to be a general pattern, not something specific to one of my queries, so I thought some communal knowledge may exist. But apparently not. ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments