From: Mischa <mischa.Sandberg@telus.net>
To: Mischa <mischa.Sandberg@telus.net>
Cc: H.J. Sanders <hjs@rmax.nl>
Cc: pgsql-performance@postgresql.org
Subject: Re: date - range
Date: Fri, 1 Apr 2005 22:25:19 -0800
Message-ID: <1112423119.424e3acf49c9f@webmail.telus.net> (raw)
In-Reply-To: <1112421584.424e34d0d2d63@webmail.telus.net>
References: <KIEBKBGIGGNDKKJJNKCFKEPLEEAA.hjs@rmax.nl>
<1112421584.424e34d0d2d63@webmail.telus.net>
Quoting Mischa <mischa.Sandberg@telus.net>:
[deleted]
> SELECT People.* FROM People
> JOIN Widths
> ON People.start = today - today % Widths.width
> AND People.width = Widths.width
Yikes! I hit the SEND button one ohnosecend too fast.
(1) You still ALSO have to test:
... AND today between first_date and last_date
(2) On some SQL engines, it makes a different to how the engine can re-order the
nested loops, if you make the index (width,start) instead of (start,width).
Haven't tried on PG8 yet.
--
"Dreams come true, not free."
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: mischa.Sandberg@telus.net, hjs@rmax.nl
Subject: Re: date - range
In-Reply-To: <1112423119.424e3acf49c9f@webmail.telus.net>
* 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