Saiho Yuen
2006-Jul-14 18:56 UTC
[Rails] ActiveRecord, can it save more than one row at a time????
Hi, I wonder if there is some fonctions which allow an activeRecord to save more than one row at a time??? As I understand, when we create an object from AC::Base, it represents one row of the table. So if I want to save more than one row, I have to create the object one by one and then save them one by one. If I have 10, it is fine, but if I have more than 1000, so it will a lot of time.... So I wonder is there any way to do this??? Thanks you very much Saiho The mind is its own place, and in itself. Can make a Heaven of Hell, a Hell of Heaven. http://www.geocities.com/sayoyo/ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Mark Van Holstyn
2006-Jul-14 22:01 UTC
[Rails] ActiveRecord, can it save more than one row at a time????
Check out this article... http://blogs.mktec.com/zdennis/articles/2006/07/14/optimizing-activerecord-upcoming-presentation When he is done with this and releases it should enhance dealing with large datasets dramatically. Mark On 7/14/06, Saiho Yuen <sayoyo@yahoo.com> wrote:> > Hi, > > I wonder if there is some fonctions which allow an > activeRecord to save more than one row at a time??? > > As I understand, when we create an object from > AC::Base, it represents one row of the table. So if I > want to save more than one row, I have to create the > object one by one and then save them one by one. If I > have 10, it is fine, but if I have more than 1000, so > it will a lot of time.... So I wonder is there any way > to do this??? > > Thanks you very much > > Saiho > > > The mind is its own place, and in itself. > Can make a Heaven of Hell, a Hell of Heaven. > > http://www.geocities.com/sayoyo/ > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Mark Van Holstyn mvette13@gmail.com http://lotswholetime.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060714/f5b84c7f/attachment.html