gpt4 book ai didi

performance - 如何分析 PostgreSQL 9.2 中的 plpgsql 函数

转载 作者:行者123 更新时间:2023-11-29 12:00:26 25 4
gpt4 key购买 nike

我想找到 plpgsql 函数中的瓶颈,所以我正在寻找一个分析器。

How do I enable the PostgreSQL function profiler?建议加载plugin_profiler.dll库,不过是为8.3写的,9.2好像没有这个东西

我还安装了 http://git.postgresql.org/gitweb/?p=pldebugger.git;a=summary 中描述的调试器(包含在 9.2 中),但看不到任何将其用作分析器的方法。

简单的“RAISE NOTICE”方法对我来说无效,因为该函数在 < 0.1 毫秒内执行,但被调用了很多次。

最佳答案

PostgreSQL 9.2 有内置的 SQL 分析器,尝试使用它 - 如果你的 plpgsql 包含一些 SQL 查询。

http://www.postgresql.org/docs/9.2/static/pgstatstatements.html

现在,plpgsql_check具有集成分析器

关于performance - 如何分析 PostgreSQL 9.2 中的 plpgsql 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18174744/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com