>>Thanks, Garrett. Moving the odometer comparisons from the join condition to the where actually slowed it down, but the BETWEEN ... AND is good to know. It's a little faster than the >=/<=, and makes it easier to read the code.
>
>Sorry about that. I just noticed that I originally posted it with the odometer comparisons in WHERE. Anyway, it runs faster with that part in the JOIN condition... Thanks again for the BETWEEN! :)
You're welcome. I have an article in the pipeline explaining the difference between filtering in the JOIN and in the WHERE. It will be Q268906 if it makes it through the review process.
(Summarizing, if you have an outer join and you're filtering on the child table, you get different results from putting the filter in the JOIN or the WHERE.)