pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gunther Schadow <gunther@aurora.regenstrief.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Decision support query inefficiencies ...
Date: Mon, 29 Jul 2002 16:39:43 -0400
Message-ID: <11828.1027975183@sss.pgh.pa.us> (raw)
In-Reply-To: <3D459ED0.3030000@aurora.regenstrief.org>
References: <3D459ED0.3030000@aurora.regenstrief.org>

Gunther Schadow <gunther@aurora.regenstrief.org> writes:
> A very frequent decision support query we have to make is to get the
> last act of a certain type that occurred before a certain cut-off
> date.

This seems pretty close to the type of problem DISTINCT ON is intended
to solve.  Look at the "weather report" example in the SELECT reference
page.

			regards, tom lane



view thread (2+ messages)

Message-ID: <11828.1027975183@sss.pgh.pa.us>
Permalink:  ../11828.1027975183@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11828.1027975183@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gunther@aurora.regenstrief.org
  Subject: Re: Decision support query inefficiencies ...
  In-Reply-To: <11828.1027975183@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox