postgresql - 在 200 多万条记录上提高 postgresql-9.5 的性能

标签 postgresql database-performance postgresql-9.5 database-optimization

我在 postgresql-9.5 表中有 200 多条记录。几乎所有查询都是分析查询。到目前为止,为了提高和优化查询性能,我正在尝试使用索引,但似乎还不够。我需要研究的其他选项是什么?

最佳答案

根据where子句条件创建分区表(https://www.postgresql.org/docs/10/static/ddl-partitioning.html) ,它会大大降低查询成本,如果where子句中有一定的固定值,则对分区表进行部分索引。 重点检查where子句中列的顺序并在索引时匹配它

关于postgresql - 在 200 多万条记录上提高 postgresql-9.5 的性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50329440/

相关文章:

postgresql - 运行守护神失败

postgresql - wso2 API 端点创建失败 : 404 ressource not found

mysql - 二级关键词搜索的索引结构

postgresql - 在文本中查找日期和时间值,然后更新另一列

postgresql - 如何在postgres中的json数组上创建索引?

MySQL按日期大间隔查询

postgresql - postgresql中 "Timestamp with zone"的默认值是什么?

sql - 如何在Postgresql中查询MAX(SUM(relation))?

postgresql - 整数列可以为空吗?

Mysql 如何在不加锁的情况下做到这一点