not sure it matters here, since the notifier will reorder the results
anyway.  my original question was about the execution plan for the query,
as opposed to the order in which results are returned, if that makes
sense.  so far performance seems pretty consistent in load test, so there
may be room to optimize but i don't have any strong concerns about this for
now.


On Wed, Aug 7, 2013 at 12:34 PM, Kevin Chugh <notifications@github.com>wrote:

> In models/comment.rb:
>
> > @@ -97,6 +97,14 @@ def commentable_id
> >        end
> >      end
> >    end
> > +
> > +  def self.by_date_range_and_thread_ids from_when, to_when, thread_ids
> > +     #return all content between from_when and to_when
> > +
> > +     self.where(:created_at.gte => (from_when)).where(:created_at.lte => (to_when)).
> > +       where(:comment_thread_id.in => thread_ids)
>
> do you think we want created_at or created_at DESC in the digest?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/cs_comments_service/pull/45/files#r5636150>
> .
>