Forum: Ruby on Rails Collecting Model Statistics

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
52581fe8ea3eb8d1f99e27b8b8bb5530?d=identicon&s=25 michael.j.thomas (Guest)
on 2007-06-09 00:08
(Received via mailing list)
I have a model hierarchy that looks like:

User has many days, a day has many items.

I'm trying to collect cheap (processing) statistics about the items,
specifically on the count of duplicates.

Ultimately I want to know if an item is such that it is included in
many days, and further more to know the rank of top items in the
system.

Currently I have a Count function that determines how many times an
Item is found, but it's expensive to execute when it's run for
thousands of items.  Any ideas?
This topic is locked and can not be replied to.