On Wednesday, August 31, 2016 at 9:47:52 PM UTC-7, Trevor Turk wrote:
>
> Hello,
>
> I've been reading about paged_each and it seems to work well in my 
> testing, but I'm concerned about using it in production because the 
> documentation says it uses a transaction internally. 
>
> I plan to make a "backfill" script that iterates over all rows in a 
> production database and enqueues background jobs for processing them etc.
>
> Would using paged_each lock the table and prevent my (Sinatra) app from 
> functioning regularly?
>
> Thank you!
> - Trevor
>

Dataset#paged_each shouldn't lock the entire table, as it just selects 
rows, but the behavior in regards to locking depends on the database.  It 
would probably be best for you to try it in a test environment to be sure 
it functions as you expect, before using it in production.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to