- OldNode.find(:all, :conditions => ['id >= ? AND id < ?',lower_bound, upper_bound], :order => 'timestamp').each do |node|
- hash[node.id] = [] if hash[node.id].nil?
- hash[node.id] << node
+ while offset < (id_max + increment)
+ hash = {}
+
+ # should be offsetting not selecting
+ OldNode.find(:all, :limit => increment, :offset => offset, :order => "timestamp").each do |node|
+ hash[node.id] ||= []
+ hash[node.id] << node