From: | Mischa <mischa(dot)Sandberg(at)telus(dot)net> |
---|---|
To: | Mischa <mischa(dot)Sandberg(at)telus(dot)net> |
Cc: | "H(dot)J(dot) Sanders" <hjs(at)rmax(dot)nl>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: date - range |
Date: | 2005-04-02 06:25:19 |
Message-ID: | 1112423119.424e3acf49c9f@webmail.telus.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Quoting Mischa <mischa(dot)Sandberg(at)telus(dot)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."
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-04-02 07:01:31 | Re: date - range |
Previous Message | Mischa | 2005-04-02 05:59:44 | Re: date - range |