# 大型网站的搜索查询超时

**URL:** <https://meta.discourse.org/t/search-query-times-out-for-big-sites/138267>\
**Category:** Development\
**Created:** [2020年一月10日 19:28 UTC](https://meta.discourse.org/t/search-query-times-out-for-big-sites/138267 "2020-01-10T19:28:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2020年一月10日 19:33 UTC](https://meta.discourse.org/t/search-query-times-out-for-big-sites/138267/2 "2020-01-10T19:33:16Z")

</div>

一种快速且简单的提升搜索速度的方法是使用设置项“优先显示近期帖子”和“近期帖子数量”。通过优先展示近期帖子来填充搜索结果，这种方法效果很好。

除此之外，您还需要对数据库性能进行分析，检查执行计划、成本等。对于大型论坛，您需要更多内存以维持性能（并相应调整 PostgreSQL 设置）。

如果其他方法都无效，您也可以尝试访问 [Discourse Algolia Search](https://meta.discourse.org/t/add-algolia-search-to-your-discourse/73517?u=falco) 将 Algolia 搜索添加到您的 Discourse 论坛。

---

_[View the full topic](https://meta.discourse.org/t/search-query-times-out-for-big-sites/138267)._
