原文:http://blog.csdn.net/hantiannan/article/details/4513028
1.log_min_duration_statement |
这个参数是设置执行最小多长时间的 |
|
|
|
|
|
|
2.contrib/auto_explain功能。Postgres8.4后增加的功能。 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3.log统计分析工具(PostgreSQL log analyzer) |
可以统计分析最慢的SQL,调用最多的SQL,花费时间最多的SQL等等分类。这样我们就很容易找到速度慢的SQL。再加以改善。 |