I'm working a lot with a VERY large mysql2 database at the moment, and although I have indexed what I thought were the proper fields, the return time for some queries is quite slow.
I have two models that are causing issues, Comment and Commenter.
Now, there is a has_many relationship between Commenter and Comment, but my query relies on finding the each Comment's Commenter's username. So I'll run something like this:
c = Blog.first.comments ##this bit runs fine, I indexed the "blog_id" field on Comments
c.collect {|c| c.commenter.username}
To help with the speed issues, I created an index on the commenter_id field for the Comment model. But it is still running very slow..
Does anybody know of what I could do differently, that would help increase the speed of the query?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)