600 CHAPTER 26 POSTGRESQL ADMINISTRATION log_min_duration_statement This (Msn web hosting)
600 CHAPTER 26 POSTGRESQL ADMINISTRATION log_min_duration_statement This setting, added in version 7.4, is similar to log_duration, but in this case the statement and duration are only printed if execution time exceeds the time allotted here. The value represents 1 millisecond, with the default being 1(meaning no queries are logged). This setting is best set in multiples of 1,000, depending on how responsive you need your system to be. It is also often recommended to set this value to something really high (30,000, or 30 seconds) and handle those queries first, gradually reducing the setting as you deal with any queries that are found. Tip There is a popular external tool called Practical Query Analysis (PQA) that can be used to do more advanced analyses of PostgreSQL log data to find slow query bottlenecks. You can find out more about this tool on its homepage at http://pqa.projects.postgresql.org/. Managing Run-Time Information When administering a database server, you will often need to see information about the current state of affairs with the server, and gather profiling information regarding queries being executed on the system. The following settings help control the amount of information made available through PostgreSQL. stats_start_collector This setting controls whether PostgreSQL will collect statistics. The default value is for this setting to be turned on, and you should verify this setting if you intend to do any profiling on the system. stats_command_string This setting controls whether PostgreSQL should collect statistics on currently executing commands within each setting. The information collected includes both the query being executed and the start time of the query. This information is made available in the pg_stat_activity view. The default is to leave this setting turned off, because it incurs a small performance disadvantage. However, unless you are under the most dire of server loads, you are strongly recommended to turn this setting on. stats_row_level This setting controls whether PostgreSQL should collect row-level statistics on database activity. This information can be viewed through the pg_stat and pg_stat_io system views. This information can be invaluable for determining system use, including such things as determining which indexes are underused and thus not needed, and determining which tables have a high number of sequential scans and thus might need an index. The default is to turn this setting off, because it incurs a performance penalty when turned on. However, the tuning information that can be obtained often outweighs this penalty, so you may want to turn it on.
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.