Re: Notes about Pl/PgSQL assignment performance
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Andrey Zhidenkov <pensnarik@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Pavel Stehule <pavel.stehule@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2017-12-19T14:06:23Z
Lists: 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