我目前遇到了一些性能问题,因为在AWS RDS上打一个Postgresql数据库时遇到了问题。该应用在2天前运行良好,但是现在有一些查询冻结了该应用。
只有8行结果的联接查询最多需要2300毫秒,而有30行结果的联接查询则需要4000毫秒以上。
以下是执行查询的示例:
protected def jobOfferQuery = for {
(((mission, client), process), clientCompany) <- jobOffers
.joinLeft(users).on(_.clientId === _.userId)
.joinLeft(processes).on(_._1.offerId === _.jobOfferId)
.joinLeft(companies)
} yield (mission, client, process, clientCompany)
这是我的游戏应用程序的精巧配置:
database {
dataSourceClass = org.postgresql.ds.PGSimpleDataSource
properties = {
serverName = ${app.postgres.host}
portNumber = ${app.postgres.port}
databaseName = ${app.postgres.db}
user = ${app.postgres.user}
password = ${app.postgres.password}
}
poolName = ${app.postgres.poolName}
numThreads=5
driver="slick.driver.PostgresDriver$"
}
怎么会这么慢?我应该添加更多hikarycp配置吗?
非常感谢您对我的帮助,非常感谢..