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