Get the most out of your PL/pgSQL code with plProfiler.
Finding performance problems within PL/pgSQL functions and stored procedures can be difficult, especially when the code is nested.
This is where the plProfiler extension (available for pg95 & pg96 in the BigSQL DevOps Windows, OSX, & Linux distributions) can help to quickly identify the most time consuming functions and then drill down to find the individual statements within them. As a result, making your code more efficient and increasing your query speed.
The output, generated by the plProfiler, is a self-contained HTML document. The document starts with a CPU Flame Graph at the top, followed by details about functions in the profile.
PL/pgSQL, implemented by OpenSCG’s Jan Wieck, is a fully featured programming language resembling Oracle’s PL/SQL. It is the only programming language installed by default for PostgreSQL. In SQL, every statement must be executed individually by the database server. With PL/pgSQL you can group a block of computations and a series of queries inside the database server, thus having the power of a procedural language and the ease of use of SQL, but with considerable savings of client/server communication overhead.