X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 4B75330FC19 for ; Wed, 25 Jun 2003 14:30:56 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 48936-04 for ; Wed, 25 Jun 2003 11:30:45 -0300 (ADT) Received: from mail.deltav.hu (oldmail.deltav.hu [213.163.0.192]) by svr1.postgresql.org (Postfix) with ESMTP id 8293230FC07 for ; Wed, 25 Jun 2003 11:30:43 -0300 (ADT) Received: from fejleszt4 ([213.163.10.103]) by mail.deltav.hu (Netscape Messaging Server 3.6) with SMTP id AAAB51 for ; Wed, 25 Jun 2003 16:20:28 +0200 Message-ID: <009401c33b25$08520e90$0403a8c0@fejleszt4> From: =?ISO-8859-1?Q?SZUCS_G=E1bor?= To: References: Subject: Re: How to optimize monstrous query, sorts instead of Date: Wed, 25 Jun 2003 16:20:32 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Archive-Number: 200306/166 X-Sequence-Number: 2250 Michael, Actually, you missed an alias :) the select now returned 800k rows! (according to explain) pointed it out below. See my prev mail for more. If it's possible, try your query on a backend and look for notices like "Adding missing FROM clause for table ..." G. ------------------------------- cut here ------------------------------- ----- Original Message ----- From: "Michael Mattox" Cc: "Postgresql Performance" Sent: Wednesday, June 25, 2003 4:09 PM > from monitorx m, monitorstatusx ms, monitorstatusitemx msi > where m.idx = 'M-TEST_1444-TEST_00_10560561260561463219352' AND > monitorx.jdoidx = ms.monitorx AND ^^^^^^^^ substitute the same alias "m" here.