Re: Notes about Pl/PgSQL assignment performance - Mailing list pgsql-hackers

From David Rowley
Subject Re: Notes about Pl/PgSQL assignment performance
Date
Msg-id CAKJS1f_qqkhWwnbeTygUDg9XKJveAkQ2R8xOuXimTJ-sGe=JaA@mail.gmail.com
Whole thread Raw
In response to Re: Notes about Pl/PgSQL assignment performance  (Andrey Zhidenkov <pensnarik@gmail.com>)
List pgsql-hackers
On 20 December 2017 at 02:48, Andrey Zhidenkov <pensnarik@gmail.com> wrote:
> PLPGSQL_STMT_ASSIGN -> exec_stmt_assign() -> exec_assign_expr() ->
> exec_eval_expr() -> exec_run_select() -> SPI_execute_plan_with_paramlist()
> -> _SPI_execute_plan() which finnaly calls PushActiveSnapshot() and
> PopActiveSnapshot() wich just do memory context allocations and use malloc()
> to copy snaphot.

Probably the best thing to do is to look at which functions are taking
the most time by doing a perf record for a single running instance,
then the same again with multiple instances running. Perhaps something
in there might appear in the samples more often with the multiple
instances than it does with a single instance.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Using ProcSignal to get memory context stats from a running backend
Next
From: Marina Polyakova
Date:
Subject: Re: WIP Patch: Pgbench Serialization and deadlock errors