Received: from www-uk-05.digiserve.com ([195.172.23.63]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0NG86071879 for ; Tue, 23 Jan 2001 11:08:06 -0500 (EST) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id QAA17935; Tue, 23 Jan 2001 16:08:37 GMT Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id 0E4E92A390; Tue, 23 Jan 2001 16:06:00 +0000 (GMT) Message-ID: <008101c08556$5f510200$1001a8c0@archonet.com> From: "Richard Huxton" To: , References: Subject: Re: monster query, how to make it smaller Date: Tue, 23 Jan 2001 16:05:56 -0000 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 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200101/294 X-Sequence-Number: 963 ----- Original Message ----- From: To: Sent: Tuesday, January 23, 2001 2:42 PM Subject: [SQL] monster query, how to make it smaller > Hello everybody > > I need some help on a monster query. Please see the attached file for the > query itself. The only difference is Z_durch_soll and the offset, which is > currently 0.25. The query will run in a loop where I increment this offset > until I find enough records. I'm not entirely clear on what you are trying to do, but perhaps something like ... AND Z_durch_soll in ('286.35', '286.30', '286.25') instead of all the UNIONs? This is the same as ... AND (Z_durch_sol1='286.35' OR Z_durch_sol1='286.30' ...) HTH - Richard Huxton