does partial_updates work? #8

Closed
inspire22 opened this Issue Feb 8, 2011 · 3 comments

Projects

None yet

2 participants

@inspire22

It seems to re-create all the files from scratch.

The queries look like this though:
SQL (105.5ms) SELECT COUNT(users.id) FROM users WHERE (deleted=0 AND (4762191 >= '4762191'))
User Load (18.9ms) SELECT users.* FROM users WHERE (deleted=0 AND (4762191 >= '4762191')) LIMIT 5000 OFFSET 0
User Load (19.9ms) SELECT users.* FROM users WHERE (deleted=0 AND (4762191 >= '4762191') AND (id > '12655')) LIMIT 5000
User Load (20.4ms) SELECT users.* FROM users WHERE (deleted=0 AND (4762191 >= '4762191') AND (id > '12655') AND (id > '28679')) LIMIT 5000

So it's loading the old max_id, but then just including it in "4762191 >= '4762191'", which does nothing..

@alexrabarts
Owner

Sorry for the late response. Are you passing through the :primary_column option? If you can provide a sample test case, that would be awesome. If not, as much info on how you are calling the code would be great. Thanks, Alex

@inspire22

no I hadn't been. Looking at the code i see where that's required. Perhaps it should either have a default of 'id' or be mentioned in the readme :P

thanks for a great project!

@inspire22

P.S. some debug settings could be handy, like

puts "#{model.class} batch #{batch_num}/#{batch_num_end} started #{Time.now}" if $debug

Something showing the AR sql log to the console would be handy too, though I can just look in the development log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment