contrib/pg_stat_statements 1212
От | ITAGAKI Takahiro |
---|---|
Тема | contrib/pg_stat_statements 1212 |
Дата | |
Msg-id | 20081212182754.BBA1.52131E4D@oss.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: contrib/pg_stat_statements 1202 ("Vladimir Sitnikov" <sitnikov.vladimir@gmail.com>) |
Ответы |
Re: contrib/pg_stat_statements 1212
Re: contrib/pg_stat_statements 1212 |
Список | pgsql-hackers |
Here is an updated version of pg_stat_statements. [Changes] - A new GUC variable 'explain_analyze_format' is added. - Statistics counters are converted into a variable 'BufferStats'. "Vladimir Sitnikov" <sitnikov.vladimir@gmail.com> wrote: > Can I ask my question once again? > Why don't you want to make "print all the info" the default output format? I added a new GUC variable 'explain_analyze_format' to print all statistics counters in EXPLAIN ANALYZE. We can set special variables into it to get non-default counters. I think everyone don't always require all the info. Of course TABLE-explain and XML-explain could handle the counters better, but this patch should not include them. A variable 'BufferStats' is for cleanup calculations of many separated counters. It is exported (marked as PGDLLIMPORT) so that users can add a user-defined view like pg_stat_session_buffer_usage if needed. Comments welcome. [Sample output of explain_analyze_format] =# SET explain_analyze_format = ' gets=%g reads=%r temp=%t cpu=%p'; =# EXPLAIN ANALYZE SELECT * FROM accounts; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- Seq Scan on accounts (cost=0.00..2640.00 rows=100000 width=97) (actual time=0.054..117.046 rows=100000 loops=1 gets=1640reads=1608 temp=0 cpu=125.00) Total runtime: 208.167 ms (2 rows) The following special variables are available: %g : # of shared buffer gets (= %h + %r) %h : # of shared buffer hits %r : # of shared buffer reads %w : # of shared buffer writes %G : # of local buffer gets (= %H + %R) %H : # of local buffer hits %R : # of local buffer reads %W : # of local buffer writes %t : # of buffile reads %T : # of buffile writes %u : user cpu time %s : sys cpu time %p : total cpu times (= %u + %s) Regards, --- ITAGAKI Takahiro NTT Open Source Software Center
Вложения
В списке pgsql-hackers по дате отправления: