Slick 3.0 bulk insert or update (upsert)
There are several ways that you can make this code faster (each one should be faster than the preceding ones, but it gets progressively less idiomatic-slick): Run insertOrUpdateAll instead of insertOrUpdate if on slick-pg 0.16.1+ await(run(TableQuery[FooTable].insertOrUpdateAll rows)).sum Run your DBIO events all at once, rather than waiting for each one to commit before you run … Read more