Re: monster query, how to make it smaller

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>, <juerg(dot)rietmann(at)pup(dot)ch>
Subject: Re: monster query, how to make it smaller
Date: 2001-01-23 16:05:56
Message-ID: 008101c08556$5f510200$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


----- Original Message -----
From: <juerg(dot)rietmann(at)pup(dot)ch>
To: <pgsql-sql(at)postgresql(dot)org>
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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-01-23 16:19:04 Re: grouping by date increments
Previous Message Richard Huxton 2001-01-23 16:01:11 Re: select returns no line