Re: Expose JIT counters/timing in pg_stat_statements

2022-04-08 Thread Julien Rouhaud
Hi, On Sat, Apr 09, 2022 at 01:51:21AM +, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Hi, > thank you for the great features. > > The attached small patch changes the data type in the document. > The following columns are actually double precision but bigint in the docs. >

RE: Expose JIT counters/timing in pg_stat_statements

2022-04-08 Thread Shinoda, Noriyoshi (PN Japan FSIP)
: Magnus Hagander Sent: Friday, April 8, 2022 8:47 PM To: Julien Rouhaud Cc: PostgreSQL Developers Subject: Re: Expose JIT counters/timing in pg_stat_statements On Tue, Mar 8, 2022 at 4:08 AM Julien Rouhaud mailto:rjuju...@gmail.com>> wrote: On Mon, Mar 07, 2022 at 01:40:34PM +0100, Magnus Ha

Re: Expose JIT counters/timing in pg_stat_statements

2022-04-08 Thread Magnus Hagander
On Tue, Mar 8, 2022 at 4:08 AM Julien Rouhaud wrote: > On Mon, Mar 07, 2022 at 01:40:34PM +0100, Magnus Hagander wrote: > > > > I wonder if there might be an interesting middle ground, or if that is > > making it too much. That is, we could have an > > Option 3: > > jit_count > > total_jit_time

Re: Expose JIT counters/timing in pg_stat_statements

2022-03-07 Thread Julien Rouhaud
On Mon, Mar 07, 2022 at 01:40:34PM +0100, Magnus Hagander wrote: > > I wonder if there might be an interesting middle ground, or if that is > making it too much. That is, we could have an > Option 3: > jit_count > total_jit_time - for sum of functions+inlining+optimization+emission time >

Re: Expose JIT counters/timing in pg_stat_statements

2022-03-07 Thread Dmitry Dolgov
> On Mon, Mar 07, 2022 at 01:27:02PM +0100, Magnus Hagander wrote: > On Fri, Feb 25, 2022 at 5:40 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > One interesting not-very-relevant for the patch thing I've noticed while > > reading it, is that there seems to be no way to find out what fraction

Re: Expose JIT counters/timing in pg_stat_statements

2022-03-07 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 5:43 PM Julien Rouhaud wrote: > > On Fri, Feb 25, 2022 at 05:38:45PM +0100, Magnus Hagander wrote: > > > > Per some off-list discussion with Julien, we have clearly been talking > > in slightly different terms. So let's summarize the options into what > > theÿ́d actually

Re: Expose JIT counters/timing in pg_stat_statements

2022-03-07 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 5:40 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > > On Fri, Feb 25, 2022 at 2:33 PM Julien Rouhaud wrote: > > > > > > Hi, > > > > > > On Fri, Feb 25, 2022 at 02:06:29PM +0100, Magnus Hagander

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-28 Thread Julien Rouhaud
On Mon, Feb 28, 2022 at 05:00:05PM +0100, Peter Eisentraut wrote: > On 25.02.22 14:06, Magnus Hagander wrote: > > +OUT jit_generation_time float8, > > +OUT jit_inlining_time float8, > > +OUT jit_optimization_time float8, > > +OUT jit_emission_time float8 > > Perhaps those should

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-28 Thread Peter Eisentraut
On 25.02.22 14:06, Magnus Hagander wrote: +OUT jit_generation_time float8, +OUT jit_inlining_time float8, +OUT jit_optimization_time float8, +OUT jit_emission_time float8 Perhaps those should be of type interval?

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Julien Rouhaud
On Fri, Feb 25, 2022 at 05:38:45PM +0100, Magnus Hagander wrote: > > Per some off-list discussion with Julien, we have clearly been talking > in slightly different terms. So let's summarize the options into what > theÿ́d actually be: > > Option 0: what is int he patch now > > Option 1: > jit_count

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Dmitry Dolgov
> On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > On Fri, Feb 25, 2022 at 2:33 PM Julien Rouhaud wrote: > > > > Hi, > > > > On Fri, Feb 25, 2022 at 02:06:29PM +0100, Magnus Hagander wrote: > > > Here's a patch to add the sum of timings for JIT counters to > > >

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 4:41 PM Magnus Hagander wrote: > > On Fri, Feb 25, 2022 at 4:40 PM Julien Rouhaud wrote: > > > > On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > > > > > > So just to be clear, you're basically thinking: > > > > > > jit_count = count of entries where

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 4:40 PM Julien Rouhaud wrote: > > On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > > > > So just to be clear, you're basically thinking: > > > > jit_count = count of entries where jit_functions>0 > > jit_functions = > > jit_optimizatinos = count of

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Julien Rouhaud
On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > > So just to be clear, you're basically thinking: > > jit_count = count of entries where jit_functions>0 > jit_functions = > jit_optimizatinos = count of entries where time spent on jit_optimizations > 0 > > etc? Yes exactly,

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 2:33 PM Julien Rouhaud wrote: > > Hi, > > On Fri, Feb 25, 2022 at 02:06:29PM +0100, Magnus Hagander wrote: > > Here's a patch to add the sum of timings for JIT counters to > > pg_stat_statements, as a way to follow-up on if JIT is doing a good or > > a bad job in a

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Julien Rouhaud
Hi, On Fri, Feb 25, 2022 at 02:06:29PM +0100, Magnus Hagander wrote: > Here's a patch to add the sum of timings for JIT counters to > pg_stat_statements, as a way to follow-up on if JIT is doing a good or > a bad job in a configuration. +1, it seems like something quite useful. > I decided to

Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
Here's a patch to add the sum of timings for JIT counters to pg_stat_statements, as a way to follow-up on if JIT is doing a good or a bad job in a configuration. I decided to only store the total time for the timings, since there are 4 different timings and storing max/min/etc for each one of