EDB/PGSQL 預設僅能透過 auto_explain 紀錄執行 SQL 的執行計畫到 DB Log 檔案內。
PGSQL 查看當前/歷史執行計畫的社群擴充外掛,可以直接以表查詢運行 SQL 的執行計畫,有以下兩個(截至 2022 年三月中為止):
1) 即時執行計畫:
https://www.cybertec-postgresql.com/en/products/pg-show-plans/
https://github.com/cybertec-postgresql/pg_show_plans
本外掛需要自行編譯,postgres 社群套件庫未提供,僅原廠 Cybertec 公司提供企業版支援。
不易自行打包成 RPM。
2) 歷史執行計畫:
https://ossc-db.github.io/pg_store_plans/
https://github.com/ossc-db/pg_store_plans
本外掛在 postgres 社群套件庫有提供(於 RHEL 7/8 系列都有提供),可以直接安裝到 Postgres 9.6~12(目前 PGSQL 13 尚未提供)。
https://download.postgresql.org/pub/repos/yum/srpms/9.6/redhat/rhel-8-x86_64/pg_store_plans96-1.3-1.rhel8.src.rpm
https://download.postgresql.org/pub/repos/yum/srpms/10/redhat/rhel-8-x86_64/pg_store_plans10-1.3-1.rhel8.src.rpm
https://download.postgresql.org/pub/repos/yum/srpms/12/redhat/rhel-7-x86_64/pg_store_plans_12-1.5-1.rhel7.src.rpm
https://download.postgresql.org/pub/repos/yum/srpms/12/redhat/rhel-8-x86_64/pg_store_plans12-1.3-1.rhel8.1.src.rpm
本處執行兩個測試:
1) 直接在 PGSQL10 測試本外掛
2) 使用 PGSQL 10 對應的 SRPM 打包 CentOS7 版本。
NOTE:筆記冰的有點久,從冰箱挖出來。。不過以下內容仍適用 PGSQL 13/14~
此外,在 PGSQL 14 開始,pg_stat_statements 的 queryid 變成全資料庫內通用標記了(透過 compute_query_id 啟用)~表示日後開始可以有更多可以解析 SQL 的套件出生~~(例如,現在已經有 EDB Wait States 惹~)
1) 在 PGSQL10 測試 pg_store_plans 外掛
安裝 PGSQL 10
lab@lxdlab:~$ lxc launch images:centos/8-Stream/amd64 pg10test Creating pg10test Starting pg10test lab@lxdlab:~$ lxc shell pg10test [root@pg10test ~]#
[root@pg10test ~]# yum install -y https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-8-x86_64/pgdg-redhat-repo-42.0-15.noarch.rpm [root@pg10test ~]# yum group install -y "PostgreSQL Database Server 10 PGDG" [root@pg10test ~]# yum install -y pg_store_plans10 [root@pg10test ~]# /usr/pgsql-10/bin/postgresql-10-setup initdb
啟動資料庫
[root@pg10test ~]# cat << EOF >> /var/lib/pgsql/10/data/postgresql.auto.conf
listen_addresses = '*'
shared_preload_libraries = 'pg_stat_statements, pg_store_plans'
## pg_stat_statements parameters ##
track_io_timing = 'on'
track_activity_query_size = 2048
pg_stat_statements.max = '5000'
pg_stat_statements.track = 'all'
pg_stat_statements.track_utility = 'off'
pg_stat_statements.save = 'on'
# for PGSQL v13+
#pg_stat_statements.track_planning = 'on'
## pg_store_plans parameters ##
pg_store_plans.max = 5000
pg_store_plans.track = 'all'
#pg_store_plans.log_analyze = 'on'
pg_store_plans.plan_format = 'text'
pg_store_plans.save = 'on'
EOF
[root@pg10test ~]# echo "host all all 10.0.0.1/8 trust" >> /var/lib/pgsql/10/data/pg_hba.conf
[root@pg10test ~]# service postgresql-10 start
操作方式與 pg_stat_statements 相仿,兩個模組的紀錄可以透過 JOIN 搭配查看,但可能部份會對不到(因為兩模組都個別依照執行頻度踢掉紀錄)。
[postgres@pg10test ~]$ psql psql (10.16) Type "help" for help. postgres=# create extension pg_store_plans ; CREATE EXTENSION postgres=# create extension pg_stat_statements ; CREATE EXTENSION postgres=#
用 pgAdmin4 或 PEM 進入資料庫,就會一直有 SQL 在查詢,也就可以看到收集的執行計畫。
以下可見相同 SQL 但有出現不同執行計畫,就會呈現
postgres=# select queryid,count(*),array_agg(planid) from pg_store_plans group by queryid; queryid | count | array_agg ------------+-------+----------------------------------- 870497241 | 1 | {326764836} 3056514800 | 1 | {366744036} 2223656114 | 1 | {369124207} 1366497725 | 1 | {2256220295} 3362048751 | 1 | {1591066493} 17924312 | 1 | {3889083815} 2807979931 | 3 | {3212201675,2675583821,578668368} 1392073256 | 1 | {2077619429} 3188590383 | 1 | {1519639343} 566170830 | 1 | {2540219339} 977832272 | 1 | {2319805041} 2264508040 | 1 | {2879024282} 813094406 | 1 | {2346985086} 3893981790 | 1 | {789787292} 492750220 | 1 | {2881624998} 1860639615 | 1 | {2351976881} 2775272848 | 1 | {1013543676} 3665923672 | 1 | {823136125} 3789275969 | 1 | {3783548220} 1968399307 | 1 | {3234485444} 522778601 | 1 | {3285725950} 251869620 | 1 | {880290592} 3528998757 | 1 | {1349057335} 2762998146 | 1 | {326764836} 2876496726 | 1 | {1349057335} 2200155994 | 1 | {3686786925} 1854754214 | 1 | {940279134} 1978911208 | 1 | {2928039650} 485698078 | 1 | {2936965379} 3893699259 | 1 | {2256220295} (30 rows) postgres=# postgres=# select queryid_stat_statements,count(*),array_agg(planid) from pg_store_plans group by queryid_stat_statements; queryid_stat_statements | count | array_agg -------------------------+-------+----------------------------------- 3904495550 | 1 | {2540219339} 2477317934 | 1 | {2077619429} 3010473354 | 1 | {3783548220} 4209409695 | 1 | {2346985086} 3026878440 | 1 | {789787292} 2628992747 | 1 | {2936965379} 233119972 | 1 | {326764836} 3672445964 | 1 | {2879024282} 1419723350 | 1 | {940279134} 222437654 | 1 | {2928039650} 2748804465 | 1 | {2351976881} 3684979658 | 1 | {3889083815} 747822837 | 1 | {880290592} 1272991303 | 1 | {2256220295} 3285735059 | 1 | {366744036} 4115798515 | 1 | {2881624998} 197681292 | 1 | {1349057335} 3669709269 | 1 | {369124207} 618259047 | 1 | {1349057335} 3528871234 | 1 | {3285725950} 503747558 | 1 | {326764836} 1020996122 | 1 | {823136125} 839159024 | 1 | {1591066493} 2592892555 | 1 | {1013543676} 115303691 | 1 | {2256220295} 1149989536 | 1 | {2319805041} 1725240158 | 1 | {3234485444} 1742510132 | 1 | {3686786925} 3271612687 | 1 | {1519639343} 166385528 | 3 | {3212201675,2675583821,578668368} (30 rows) postgres=#
2) 使用 PGSQL 10 對應的 SRPM 打包 CentOS7 版本。
準備編譯環境
lab@lxdlab:~$ lxc launch images:centos/7 pg10test Creating pg10test Starting pg10test lab@lxdlab:~$ lxc shell pg10test [root@pg10test ~]# yum install -y https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-8-x86_64/pgdg-redhat-repo-42.0-15.noarch.rpm
[root@pg10test ~]# yum group install -y "PostgreSQL Database Server 10 PGDG" [root@pg10test ~]# yum install -y postgresql10-devel [root@pg10test ~]# export PATH=$PATH:/usr/pgsql-10/bin/ [root@pg10test ~]# pg_config --configure '--enable-rpath' '--prefix=/usr/pgsql-10' '--includedir=/usr/pgsql-10/include' '--libdir=/usr/pgsql-10/lib' '--mandir=/usr/pgsql-10/share/man' '--datadir=/usr/pgsql-10/share' '--with-icu' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/usr/lib64' '--with-openssl' '--with-pam' '--with-gssapi' '--with-includes=/usr/include' '--with-libraries=/usr/lib64' '--enable-nls' '--enable-dtrace' '--with-uuid=e2fs' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-selinux' '--with-systemd' '--with-system-tzdata=/usr/share/zoneinfo' '--sysconfdir=/etc/sysconfig/pgsql' '--docdir=/usr/pgsql-10/doc' '--htmldir=/usr/pgsql-10/doc/html' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' [root@pg10test ~]# [root@pg10test ~]# pg_config --version PostgreSQL 10.16 [root@pg10test ~]#
[root@pg10test ~]# yum group install -y "Development Tools"
[root@pg10test ~]# yum install -y epel-release centos-release-scl edb-as96-server-devel
[root@pg10test ~]# ##yum install -y llvm5.0-devel
[root@pg10test ~]# ##yum install -y llvm-toolset-7
[root@pg10test ~]# yum install -y rpm-build rpmdevtools
[root@pg10test ~]#
[root@pg10test ~]# yum install -y https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-7.0-x86_64/pgdg-srpm-macros-1.0.12-1.rhel7.x86_64.rpm
[root@pg10test ~]# rpm -ql pgdg-srpm-macros
/usr/lib/rpm/macros.d/macros.pgdg-postgresql
/usr/share/doc/pgdg-srpm-macros-1.0.12
/usr/share/doc/pgdg-srpm-macros-1.0.12/AUTHORS
/usr/share/licenses/pgdg-srpm-macros-1.0.12
/usr/share/licenses/pgdg-srpm-macros-1.0.12/COPYRIGHT
[root@pg10test ~]#
以下開始編譯打包 RPM
[root@pg10test ~]# yum install -y wget tree [root@pg10test ~]# wget https://download.postgresql.org/pub/repos/yum/srpms/10/redhat/rhel-8-x86_64/pg_store_plans10-1.3-1.rhel8.src.rpm [root@pg10test ~]# rpm -ivh pg_store_plans10-1.3-1.rhel8.src.rpm [root@pg10test ~]# tree ~/rpmbuild/ /root/rpmbuild/ |-- SOURCES | |-- 1.3.tar.gz | |-- README-pg_store_plans.txt | `-- pg_store_plans-pg10-makefile-pgxs.patch `-- SPECS `-- pg_store_plans.spec 2 directories, 4 files [root@pg10test ~]#
[root@pg10test ~]# echo $PATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/pgsql-10/bin/ [root@pg10test ~]# rpmbuild --define='%pgmajorversion 10' --define='pginstdir /usr/pgsql-%{pgmajorversion}' -bb ~/rpmbuild/SPECS/pg_store_plans.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.gWpFgU + umask 022 + cd /root/rpmbuild/BUILD + cd /root/rpmbuild/BUILD + rm -rf pg_store_plans-1.3 + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/1.3.tar.gz + /usr/bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd pg_store_plans-1.3 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + echo 'Patch #0 (pg_store_plans-pg10-makefile-pgxs.patch):' Patch #0 (pg_store_plans-pg10-makefile-pgxs.patch): + /usr/bin/cat /root/rpmbuild/SOURCES/pg_store_plans-pg10-makefile-pgxs.patch + /usr/bin/patch -p0 --fuzz=0 patching file Makefile + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Tze5w3 + umask 022 + cd /root/rpmbuild/BUILD + cd pg_store_plans-1.3 + /usr/bin/make USE_PGXS=1 -j4 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -fPIC -I. -I./ -I/usr/pgsql-10/include/server -I/usr/pgsql-10/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o pg_store_plans.o pg_store_plans.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -fPIC -I. -I./ -I/usr/pgsql-10/include/server -I/usr/pgsql-10/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o pgsp_json.o pgsp_json.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -fPIC -I. -I./ -I/usr/pgsql-10/include/server -I/usr/pgsql-10/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o pgsp_json_text.o pgsp_json_text.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -fPIC -I. -I./ -I/usr/pgsql-10/include/server -I/usr/pgsql-10/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o pgsp_explain.o pgsp_explain.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -fPIC -shared -o pg_store_plans.so pg_store_plans.o pgsp_json.o pgsp_json_text.o pgsp_explain.o -L/usr/pgsql-10/lib -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-10/lib',--enable-new-dtags -Wl,--build-id + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.M3bjqf + umask 022 + cd /root/rpmbuild/BUILD + '[' /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 '!=' / ']' + rm -rf /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 ++ dirname /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 + mkdir -p /root/rpmbuild/BUILDROOT + mkdir /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 + cd pg_store_plans-1.3 + /usr/bin/rm -rf /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 + /usr/bin/make DESTDIR=/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 USE_PGXS=1 -j4 install /usr/bin/mkdir -p '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/lib' /usr/bin/mkdir -p '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/share/extension' /usr/bin/install -c -m 755 pg_store_plans.so '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/lib/pg_store_plans.so' /usr/bin/mkdir -p '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/share/extension' /usr/bin/mkdir -p '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/lib' /usr/bin/install -c -m 644 .//pg_store_plans.control '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/share/extension/' /usr/bin/install -c -m 644 .//pg_store_plans--1.3.sql .//pg_store_plans--1.2--1.3.sql '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/share/extension/' /usr/bin/install -c -m 755 pg_store_plans.so '/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/lib/' + /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/doc/extension + /usr/bin/cp /root/rpmbuild/SOURCES/README-pg_store_plans.txt /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/doc/extension/README-pg_store_plans.md + /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /root/rpmbuild/BUILD/pg_store_plans-1.3 extracting debug info from /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/pgsql-10/lib/pg_store_plans.so dwz: Too few files for multifile optimization /usr/lib/rpm/sepdebugcrcfix: Updated 1 CRC32s, 0 CRC32s did match. 249 blocks + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Processing files: pg_store_plans10-1.3-1.el7.x86_64 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.JjFy4s + umask 022 + cd /root/rpmbuild/BUILD + cd pg_store_plans-1.3 + LICENSEDIR=/root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/share/licenses/pg_store_plans10-1.3 + export LICENSEDIR + /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/share/licenses/pg_store_plans10-1.3 + cp -pr LICENSE /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64/usr/share/licenses/pg_store_plans10-1.3 + exit 0 Provides: pg_store_plans10 = 1.3-1.el7 pg_store_plans10(x86-64) = 1.3-1.el7 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) rtld(GNU_HASH) Processing files: pg_store_plans10-debuginfo-1.3-1.el7.x86_64 Provides: pg_store_plans10-debuginfo = 1.3-1.el7 pg_store_plans10-debuginfo(x86-64) = 1.3-1.el7 Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 Wrote: /root/rpmbuild/RPMS/x86_64/pg_store_plans10-1.3-1.el7.x86_64.rpm Wrote: /root/rpmbuild/RPMS/x86_64/pg_store_plans10-debuginfo-1.3-1.el7.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.QRVH58 + umask 022 + cd /root/rpmbuild/BUILD + cd pg_store_plans-1.3 + /usr/bin/rm -rf /root/rpmbuild/BUILDROOT/pg_store_plans10-1.3-1.el7.x86_64 + exit 0 [root@pg10test ~]#
取出套件:
[root@pg10test ~]# ls ~/rpmbuild/RPMS/x86_64/ pg_store_plans10-1.3-1.el7.x86_64.rpm pg_store_plans10-debuginfo-1.3-1.el7.x86_64.rpm [root@pg10test ~]#
lab@lxdlab:~$ lxc file pull pg10test/root/rpmbuild/RPMS/x86_64/pg_store_plans10-1.3-1.el7.x86_64.rpm ~ lab@lxdlab:~$ lxc file pull pg10test/root/rpmbuild/RPMS/x86_64/pg_store_plans10-debuginfo-1.3-1.el7.x86_64.rpm ~
安裝
[root@pg10test ~]# yum install -y ~/rpmbuild/RPMS/x86_64/pg_store_plans10-1.3-1.el7.x86_64.rpm
最後再講一次,在 PGSQL 14 開始,計算 queryid 的功能從 pg_stat_statements 移動到內部,因此之後的外掛都可以用一致的 queryid 去相互查照了。
這篇像是過年年糕一樣冰很久的筆記總算貼出來惹~
參考資料:
有點不可考,回頭找發現資訊不是很多。。
PostgreSQL 11 preview - pg_stat_statements 增强,支持执行计划翻转记录 - pg_store_plans extension | blog/20180325_04.md at master · digoal/blog
尝试使用pg_store_plans,可以对标v$sql_plan - 墨天轮
pg_show_plans_一名数据库爱好者的专栏
pg_show_plans - CYBERTEC | Data Science & PostgreSQL(簡中翻譯:POSTGRESQL PG_SHOW_PLANS插件分析语句执行计划利器- 云+社区- 腾讯云)
使用PG_SHOW_PLANS监控PostgreSQL执行计划_mb6008e936aad4e的技术博客_51CTO博客
PostgreSQL 11 preview - pg_stat_statements 增强,支持执行计划翻转记录 - pg_store_plans extension | blog/20180325_04.md at master · digoal/blog
尝试使用pg_store_plans,可以对标v$sql_plan - 墨天轮
pg_show_plans_一名数据库爱好者的专栏
pg_show_plans - CYBERTEC | Data Science & PostgreSQL(簡中翻譯:POSTGRESQL PG_SHOW_PLANS插件分析语句执行计划利器- 云+社区- 腾讯云)
使用PG_SHOW_PLANS监控PostgreSQL执行计划_mb6008e936aad4e的技术博客_51CTO博客
沒有留言:
張貼留言