Hi,
I'm using Slick 3.1 and am trying to parallelize a few things within a transaction.
I have a for comprehension where I look up some info, then do some inserts and updates. Currently, the inserts and updates happen serially, but I'd love them to all execute at the same time for the best performance.
How can I do this?
val actions: Seq[DBIO[_]] = Seq(insert, update1, update2)
db.run((for {
// Normally, I'd so something with this
findResult <- findStuff(...)
// How can I make all the actions here run in parallel?
_ <- DBIO.sequence(actions)
} yield ()).transactionally)
Thanks,
Jon