On Tue, Mar 29, 2011 at 7:05 PM, hendra kusuma <[email protected]>wrote:
> Dear all, > > Is there a way to convert sequel dataset to 2D array? > I need all data in my table and save it in 2D array. > converting it manually by reading each data and save it to array > result in horibly slow performance, > 5000 records with 20 field takes 15 sec > > just want to make myself clear I am developing a business desktop application for my own store here I use gtk and sequel, and so far I am happy with those lib but then when i need to display all my product in grid / treeview, i got stuck I have about 1000 record in product table, which has 20 column (sorry, wrongly type as 5000 up there) so basically, i need to loop over my data, and assign it to my grid this line give me 15 sec Product.select_all.each do |p| true end yes, you read correctly. Product is a model class. I don't do anything there, just loop and return true, and it gives me 15 sec While sequel is fantastic and elegant, that kind of performance is unacceptable perhaps i am wrong somewhere? or there is some trick I need to use Please. I need all input since I stuck here with no idea what Regards Thank you -- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
