I''m using the plugin will_paginate with a table of more than 100,000 records, i also do a join with other table. I''m wondering if will_pagination in my situation is an appropriate choice, or whether it is better to implement something ad-hoc? -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> I''m using the plugin will_paginate with a table of more than 100,000 > records, i also do a join with other table. > I''m wondering if will_pagination in my situation is an appropriate > choice, or whether it is better to implement something ad-hoc?What are you experiencing that is making you doubt will_paginate? I haven''t used it on sets that big, but if it''s underlying queries are using LIMIT/OFFSET and appropriate indexes correctly, I don''t see why it would be any slower than something ad-hoc... -p -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Quoting Aldo Italo <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> I''m using the plugin will_paginate with a table of more than 100,000 > records, i also do a join with other table. > I''m wondering if will_pagination in my situation is an appropriate > choice, or whether it is better to implement something ad-hoc? >Large joins are generally very slow. If It Were My Code (IIWMC), I''d try it without the join as an experiment, faking or deleting any missing attributes. Another alternative if, the join adds information rather than being part of the order, conditions, etc. is, paginate the main table and do the join in the view on just the page''s records. I know: ugly, bad practice, etc. Alternately, do all the database access in your own controller code and pass the the lines/rows to paginate to display pretty w/ page links, etc. IIRC, Ryan Bates has a Railscast on this or I can supply an example from my own code. There are multiple ways to do this. All will be more work than the usual way. But first you need to know where the bottleneck is. Jeffrey -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.