ooor icon indicating copy to clipboard operation
ooor copied to clipboard

split very large reads, like foo.find(:all) into small bits ?

Open rvalyi opened this issue 15 years ago • 2 comments

Using OOOR in The Kettle ETL, if we don't pay attention we can typically request a read over all account move lines to get them exported to some external accounting format. The issue is that can generate a timeout in OpenERP server when there are too many computed fields to recompute.

Rather than force the API user to think about that to avoid timeouts, may be it's better to split the read like 100 by 100 and then makes the union of the requests.

This is easy to implement in the find_every method of OOOR, buy I'm not very sure yet still if we should do it. Thoughts?

rvalyi avatar Feb 13 '10 05:02 rvalyi

Actually, it's just better to simply make a search for ids rather than a huge read in those cases, so deferring that change until it gets more mindshare.

rvalyi avatar Feb 17 '10 14:02 rvalyi

I propose we end implement the find_each API from active_record/relation/batches.rb for that.

rvalyi avatar Jan 12 '11 19:01 rvalyi