如何在POSTGRESQL中禁用/启用不同的查询优化? [英] How to disable/enable different query optimizations in POSTGRESQL?

查看:150
本文介绍了如何在POSTGRESQL中禁用/启用不同的查询优化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一些测试,以查看Postgresql查询性能的能力。我的计划是禁用/启用不同的查询优化,例如禁用(自动)索引,禁用重新排序联接等。是否有一些配置可以快速实现此目的,或者应该修改什么部分的源代码?谢谢。

I'm doing some test to see the capability of Postgresql query performance. And my plan is to disable/enable different query optimizations, such as disable (automatic) index, disable re-order joins etc. is there some configuration to achieve this quickly or what part source code should I revise? thanks.

推荐答案

PostgreSQL为此提供了调试参数。

PostgreSQL provides debug parameters for exactly this.

请参见< a href = http://www.postgresql.org/docs/9.3/static/runtime-config-query.html#RUNTIME-CONFIG-QUERY-ENABLE rel = nofollow> enable_ 参数。

请不要在生产环境中使用它们;当时似乎是个好主意,但这些设置不会随着数据的变化和增长而适应,因此,从性能上的优势开始可能会在以后成为问题。

Please don't use them in production; it might seem like a good idea at the time, but those settings won't adapt as the data changes and grows, so what starts out as a performance win will probably become a problem later.

这篇关于如何在POSTGRESQL中禁用/启用不同的查询优化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆