# 数据库复制可以用于只读查询吗？

**URL:** https://meta.discourse.org/t/can-database-replica-be-used-for-read-only-queries/340914
**Category:** Support
**Tags:** postgres
**Created:** [2024 年12 月 6 日 13:59 UTC](https://meta.discourse.org/t/can-database-replica-be-used-for-read-only-queries/340914 "2024-12-06T13:59:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![trobiyo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trobiyo/32/311872_2.png) [@trobiyo](https://meta.discourse.org/u/trobiyo)
#### Post date: [2024 年12 月 6 日 13:59 UTC](https://meta.discourse.org/t/can-database-replica-be-used-for-read-only-queries/340914/1 "2024-12-06T13:59:10Z")

</div>

大家好：

我一直在寻找有关 `db_replica_host` 配置的文档，以及此副本主机是否可用于数据库负载均衡？（即，在使用副本时，SQL 读取查询是否可以通过此副本服务器，还是始终通过主数据库？）

我正在考虑开始使用事务池机制，但作为一种快速的变通方法，我想知道这种方法是否可以减轻主实例的压力。

提前致谢，期待您的回复。

此致，  
Ismael
