Re: Planning counters in pg_stat_statements (using pgss_store)

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: legrand legrand <legrand_legrand(at)hotmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Planning counters in pg_stat_statements (using pgss_store)
Date: 2019-07-01 11:31:07
Message-ID: CAOBaU_bP3VN6O20kpuHX595HSmHhVS_DEXSCiMEFQrrDyLNBZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 2, 2019 at 9:22 AM legrand legrand
<legrand_legrand(at)hotmail(dot)com> wrote:
>
> >> case avg_tps pct_diff
> >> 0 89 278 --
> >> 1 88 745 0,6%
> >> 2 88 282 1,1%
> >> 3 86 660 2,9%
> >>
> >> This means that even in this extrem test case, the worst degradation is less
> >> than 3%
> >> (this overhead can be removed using pg_stat_statements.track_planning guc)
>
> > Is the difference between 2 and 3 the extraneous pgss_store call to
> > always store the query text if planner hook doesn't have access to the
> > query text?
>
> Yes it is,
> but I agree it seems a big gap (1,8%) compared to the difference between 1 and 2 (0,5%).
> Maybe this is just mesure "noise" ...

Rebased patches attached.

Attachment Content-Type Size
0002-Add-planning-counters-to-pg_stat_statements.patch text/x-patch 27.9 KB
0001-Pass-query-string-to-the-planner.patch text/x-patch 10.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-07-01 11:32:00 Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2
Previous Message Thomas Munro 2019-07-01 11:29:18 Re: Tid scan improvements