pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Forcing filter/join order?
Date: Thu, 19 Feb 2004 09:39:12 -0800
Message-ID: <200402190939.12479.josh@agliodbs.com> (raw)
In-Reply-To: <28948.1077167299@sss.pgh.pa.us>
References: <200402181610.31978.josh@agliodbs.com>
	<200402182049.49111.josh@agliodbs.com>
	<28948.1077167299@sss.pgh.pa.us>

Tom,

> Uh, why do you need the child table?  

Because there's linked information which needs to be kept by day for multi-day 
events.   Also, it makes calendar reports easier, where one wants each day of 
a multi-day event to appear on each day of the calendar.

>Seems like the correct incantation
> given an assumption about maximum duration is
> 
> event_date <= 'end-date' AND (event_date + duration) >= 'start-date'
> AND event_date >= 'start-date' - 'max-duration'

Hmmmm ... so the same as what I have, only with the extra condition for 
event_date+duration and without the IN clause.   I'll try it, thanks!

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




view thread (12+ messages)  latest in thread

Message-ID: <200402190939.12479.josh@agliodbs.com>
Permalink:  ../200402190939.12479.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200402190939.12479.josh@agliodbs.com

 · 

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-performance@postgresql.org
  Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us, sszabo@megazone.bigpanda.com
  Subject: Re: Forcing filter/join order?
  In-Reply-To: <200402190939.12479.josh@agliodbs.com>

* 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