> This will be slower than the BETWEEN option above.  The issue with this 
> is that the database has to compute the date for every row in the table. 
> Not an issue if you don't have many rows.  If you have lot of rows, it 
> can be a noticeable performance hit.
> 
> The other reason to use the BETWEEN option is if you have an index on 
> created_at.  If you do, the BETWEEN option will use it.  The 
> DATE(created_at) won't (unless you're index is specifically on 
> "date(created_at)").
> 



wow thanks for a brief explanation..
I will start using between..
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to