On 07/10/2009, at 9:08 AM, Lawrence Pit <[email protected]> wrote:

> Both these queries will suck if you have loads of articles, as the
> function use of +date+ will prohibit the use of an index on  
> created_at.
>
> Use the BETWEEN ... AND ... syntax instead, using beginning and end of
> day of local time converted to utc.

Not true for PostgreSQL, you can create an index of date(scheduled_at)

-- tim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to