Hubert 'depesz' Lubaczewski: 案例研究:优化异常选择的糟糕执行计划
原文英文,约1200词,阅读约需5分钟。发表于: 。We recently hit an interesting case where planner picked wrong plan. Kinda. And figured it could be used to show how to deal with such cases. So, we have some databases on PostgreSQL 14 (yes, I...
在PostgreSQL 14中,主数据库查询快速返回,但副本因超时被杀。分析发现副本选择了错误的索引。通过重写查询和添加专用索引,性能显著提升,最终优化后的查询在副本上运行更快,解决了网站性能问题。