Skip to content

Commit

Permalink
Enable isPipelined and the performance is on par with the original
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreckYe committed Nov 19, 2024
1 parent 827f0e5 commit b963a6b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import io.vertx.kotlin.coroutines.CoroutineVerticle
import io.vertx.kotlin.coroutines.coAwait
import io.vertx.kotlin.pgclient.pgConnectOptionsOf
import io.vertx.pgclient.PgBuilder
import io.vertx.pgclient.impl.PgPoolOptions
import io.vertx.sqlclient.*
import kotlinx.coroutines.Dispatchers
import kotlinx.html.*
Expand Down Expand Up @@ -57,6 +58,9 @@ class MainVerticle(val hasDb: Boolean) : CoroutineVerticle(), CoroutineRouterSup
pipeliningLimit = 100000
)
)
.with(PgPoolOptions().apply {
isPipelined = true
})
.build()

selectWorldQuery = pool.preparedQuery(SELECT_WORLD_SQL)
Expand Down

0 comments on commit b963a6b

Please sign in to comment.