Hello all,

This is my first post to this group, so please let me know if there is
any protocol I'm supposed to follow that I missed.  Anyway, I've been
developing a Rails application for handling the registration and score
data of a math competition.  There is an existing Java applet that we
use that generates the score data with reference to problem_id,
solver_id, and the result (which is - if blank, 0 if wrong, 1 if
right, and =n if n points of partial credit are to be awarded).  It
saves each individual's answer to each question as a separate row in
the scores table.

I've wrote a script to process this data in Rails.  However, in 2008
there were over 15,000 rows in the scores table, and my current code
loads every one of them.  My current load time is about 5 seconds, and
I think it's due to making an ActiveRecord object for every one.  Is
there a way to bypass making a separate object for each?  I do need
access to the data, but it would be nicest as an array or something
under Solver.  One solution I'm currently considering is using raw SQL
for this, but I thought I'd see if anyone had any thoughts to weigh
in.

Thanks a lot!

Greg

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to