Created
March 2, 2009 20:58
-
-
Save danahern/72982 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
offset = 0 | |
time_started = Time.now | |
while !(listings = Listing.find(:all, :conditions => ["dealership_reference_number is not null and dealership_id is not null and created_on < ?", '2009-02-01'], :limit => 1000, :offset => offset*1000)).blank? do | |
time_elapsed = Time.now-time_started | |
puts offset.to_s+": "+time_elapsed.to_s | |
offset += 1 | |
time_started = Time.now | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment