use pgFouine analyse postgresql slow queries
[
2009/11/25 09:55 | by askwan ]
2009/11/25 09:55 | by askwan ]
"pgFouine is a PostgreSQL log analyzer used to generate detailed reports from a PostgreSQL log file. pgFouine can help you to determine which queries you should optimize to speed up your PostgreSQL based application."
you can use syslog or stderr
for example :use syslog
1. edit your /etc/syslog.conf
*.info;mail.none;authpriv.none;cron.none;local0.none /var/log/messages
2. edit postgresl.conf
3.download pgFouine
http://pgfouine.projects.postgresql.org/index.html
than restart syslogd and postgresql
4. analyse log
./pgfouine.php -file /var/log/postgresql/pgsql > askwan.com.html

use stderr please refer to http://gkoenig.wordpress.com/2009/02/19/pgfouine-dive-into-postgres-log/
you can use syslog or stderr
for example :use syslog
1. edit your /etc/syslog.conf
Quotation
local0.* -/var/log/pgsql
Quotation
*.info;mail.none;authpriv.none;cron.none;local0.none /var/log/messages
2. edit postgresl.conf
Quotation
log_destination = 'syslog'
silent_mode = on
log_min_duration_statement = 0
#set to 0 log all
#set to -1 ,disable query logging
#set to X(positive integral) ,means to log queries slower than X milliseconds:
log_duration = off
log_statement = 'all'
silent_mode = on
log_min_duration_statement = 0
#set to 0 log all
#set to -1 ,disable query logging
#set to X(positive integral) ,means to log queries slower than X milliseconds:
log_duration = off
log_statement = 'all'
3.download pgFouine
http://pgfouine.projects.postgresql.org/index.html
than restart syslogd and postgresql
4. analyse log
./pgfouine.php -file /var/log/postgresql/pgsql > askwan.com.html
use stderr please refer to http://gkoenig.wordpress.com/2009/02/19/pgfouine-dive-into-postgres-log/
相关日志
use Pgpool-II and HeartBeat realize high availability of postgresql
Postgresql Warm Standby Testing
use DBD::Pg to connect PostgreSQL database
PostgreSQL的mulitmaster replication解决方案Cybercluster
use Pgpool-II and HeartBeat realize high availability of postgresql
Postgresql Warm Standby Testing
use DBD::Pg to connect PostgreSQL database
PostgreSQL的mulitmaster replication解决方案Cybercluster
作者:askwan@『AskWan』
地址:http://www.askwan.com/use_pgFouine_analyse_postgresql_slow_queries/
可以转载,转载时请以链接形式注明作者和原始出处及本声明!
Mysql replication Error "Slave_SQL_Running:No"
Postgresql Warm Standby Testing












