[SCM] PostGIS branch master updated. 3.4.0rc1-946-gabf836f0a
git at osgeo.org
git at osgeo.org
Wed Feb 28 00:26:11 PST 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via abf836f0acc0c1540dad27fe700cdf60e766f018 (commit)
from 6896fe0fe7d277e586cc116eed56805e967417a2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit abf836f0acc0c1540dad27fe700cdf60e766f018
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Feb 28 09:27:15 2024 +0100
Add scripts to enable and show stats
diff --git a/topology/test/perf/enable_stats.sql b/topology/test/perf/enable_stats.sql
new file mode 100644
index 000000000..ab8eb0ba5
--- /dev/null
+++ b/topology/test/perf/enable_stats.sql
@@ -0,0 +1,4 @@
+-- See https://www.postgresql.org/docs/current/pgstatstatements.html
+CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
+SET pg_stat_statements.track to 'all';
+SELECT pg_stat_statements_reset();
diff --git a/topology/test/perf/show_stats.sql b/topology/test/perf/show_stats.sql
new file mode 100644
index 000000000..52e477f2b
--- /dev/null
+++ b/topology/test/perf/show_stats.sql
@@ -0,0 +1,15 @@
+-- See https://www.postgresql.org/docs/current/pgstatstatements.html
+SELECT
+ calls,
+ round(total_exec_time) tot_ms,
+ substring(
+ regexp_replace(
+ regexp_replace(query,'\n',' ','g'),
+ ' *',
+ ' ',
+ 'g'
+ )
+ from 1 for 90
+ ) query
+FROM pg_stat_statements
+ORDER BY total_exec_time desc;
-----------------------------------------------------------------------
Summary of changes:
topology/test/perf/enable_stats.sql | 4 ++++
topology/test/perf/show_stats.sql | 15 +++++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 topology/test/perf/enable_stats.sql
create mode 100644 topology/test/perf/show_stats.sql
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list