Skip site navigation (1) Skip section navigation (2)

Re: Forcing filter/join order?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>,pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Forcing filter/join order?
Date: 2004-02-19 17:39:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

> 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

In response to

pgsql-performance by date

Next:From: Nick BarrDate: 2004-02-19 18:06:09
Subject: Re: Postgresql on SAN
Previous:From: Josh BerkusDate: 2004-02-19 17:36:47
Subject: Re: Postgresql on SAN

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group