From: Ken Ghosh Date: 2009-10-16T18:53:28+09:00 Subject: AR_Extension help I using ar_extensions for mass insertions I found it very effective all I want is to cache the inserted records into the variable when they are inserted something of this kind for a single insert command cached_record = [] records.each_with_index do |record,i| cached_record << Record.create(:name => record,:value => i) end so that I don't have to look up in database for the inserted records as I have them on the fly is the above kind of code can used with ar_extenions or any other options so that when I do "Record.import()" for mass insertion of the records. The records can also be cache into a variable same as above Note : I don't want to lookup in database as my database is huge crossing over five million records so looking up for the inserted records e.g cached_record << Record.all that a long amount of time close to 20 min and I don't need that Thanks anyway -- Posted via http://www.ruby-forum.com/.