Re: Add min and max execute statement time in pg_stat_statement - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Add min and max execute statement time in pg_stat_statement
Date
Msg-id CAM3SWZT9SqdfF7h5xHB9bOKft1hTj3Tfu8=dKL-uzoX0L9s=dw@mail.gmail.com
Whole thread Raw
In response to Re: Add min and max execute statement time in pg_stat_statement  (Peter Geoghegan <pg@heroku.com>)
Responses Re: Add min and max execute statement time in pg_stat_statement  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Wed, Oct 23, 2013 at 4:51 PM, Peter Geoghegan <pg@heroku.com> wrote:
> No, I'm not. I'm suggesting storing the query texts externally, in a
> file. They usually use 1024 bytes of shared memory per entry,
> regardless of how long the query text is.

I should add that I think that that's about the useful limit of such
schemes. Maybe we could buy a bit more breathing room by storing some
of the stats externally, but I doubt it'd be worth it. I'm not
interested in optimizing pg_stat_statements in the direction of
supporting aggregating a number of distinct entries past much more
than 10,000. I am interested in making it store richer statistics,
provided we're very careful about the costs. Every time those counters
are incremented, a spinlock is held. I don't want everyone to have to
pay any non-trivial additional cost for that, given that the added
instrumentation may not actually be that useful to most users who just
want a rough picture.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement
Next
From: Gavin Flower
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement