Re: date - range - Mailing list pgsql-performance

From Mischa
Subject Re: date - range
Date
Msg-id 1112423119.424e3acf49c9f@webmail.telus.net
Whole thread Raw
In response to Re: date - range  (Mischa <mischa.Sandberg@telus.net>)
List pgsql-performance
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."


pgsql-performance by date:

Previous
From: Mischa
Date:
Subject: Re: date - range
Next
From: Michael Fuhr
Date:
Subject: Re: date - range