I have a mongo collection in Rails where I use it this manner:
collection.find(selector, options).to_a
I have around 47K rows of data, and it seems very slow doing it this
way.
Should I be using the cursor instead of converting to an array? If so,
can anyone point me to the usage pattern? Or, is using to_a fine? Just
wondering if converting to an array is too slow.
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment