Re: pg_stat_statements: calls under-estimation propagation

From: Sameer Thakur <samthakur74(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stat_statements: calls under-estimation propagation
Date: 2013-09-29 17:25:16
Message-ID: CABzZFEuPovNF=2Sw19YnYiLEVX3cmANjgV_fO4jsVppcWuQ71g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 23, 2013 at 1:26 PM, samthakur74 <samthakur74(at)gmail(dot)com> wrote:
>>
>> I forgot about removal of the relevant SGML, amended here in v6.
>
> Thank you for this!
> i did a quick test with following steps:
> 1. Applied v6 patch
> 2. make and make install on pg_stat_statements;
> 3. Restarted Postgres with pg_stat_statements loaded with
> pg_stat_statements.max = 4
> 4. Dropped and created extension pg_stat_statements.
>
> Executed following:
> select * from pg_stat_statements_reset();
> select * from pgbench_branches ;
> select * from pgbench_history ;
> select * from pgbench_tellers ;
> select * from pgbench_accounts;
>
> I expected 4 rows in pg_stat_statements view for each of 4 queries
> above. But i saw just 2 rows.
>
> select * from pg_stat_statements;
>
> userid | dbid | stat_session_id | query |
> quer
> y_id | calls | total_time | rows | shared_blks_hit |
> shared_blks_read |
> shared_blks_dirtied | shared_blks_written | local_blks_hit | local_blks_read
> | l
> ocal_blks_dirtied | local_blks_written | temp_blks_read | temp_blks_written
> | bl
> k_read_time | blk_write_time
> --------+-------+-----------------+---------------------------------+-----------
> -----------+-------+------------+--------+-----------------+------------------+-
> --------------------+---------------------+----------------+-----------------+--
> ------------------+--------------------+----------------+-------------------+---
> ------------+----------------
> 10 | 12900 | 21595345 | select * from pgbench_accounts; |
> -803800319
> 3522943111 | 1 | 108.176 | 100000 | 1640 |
> 0 |
> 0 | 0 | 0 | 0
> |
> 0 | 0 | 0 | 0
> |
> 0 | 0
> 10 | 12900 | 21595345 | select * from pgbench_tellers ; |
> -149722997
> 7134331757 | 1 | 0.227 | 10 | 1 |
> 0 |
> 0 | 0 | 0 | 0
> |
> 0 | 0 | 0 | 0
> |
> 0 | 0
> (2 rows)
>
>
> Am i doing something wrong?
>
Yes i was. Just saw a warning when pg_stat_statements is loaded that
valid values for pg_stat_statements.max is between 100 and 2147483647.
Not sure why though.
regards
Sameer

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Singer 2013-09-29 17:46:44 Re: record identical operator - Review
Previous Message Dave Page 2013-09-29 17:13:51 Fwd: Upcoming backbranch releases