存储过程的执行时间

发布于 2024-08-13 20:58:24 字数 165 浏览 3 评论 0原文

在 informix 11.5 上测试存储过程执行时间的古老方法是什么?我正在考虑在 unix 提示符下做这样的事情:

$ time (echo 'execute procedure foo(1)' | dbaccess ...)

还有其他想法吗?

What is the age old method of testing execution time of stored procedures on informix 11.5. I am thinking of doing something like this from a unix prompt:

$ time (echo 'execute procedure foo(1)' | dbaccess ...)

Any other ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

望她远 2024-08-20 20:58:24

当然,您可以做一些更复杂的事情,但如果这就是您所需要的,为什么还要麻烦呢?显然,如果有更多步骤,请将 sql 移至单独的文件中并运行

time dbaccess <dbname> file.sql

,顺便说一句,您的代码片段中缺少一个引用。

Sure, you can do something more elaborate, but if that's all you need, why bother? Obviously if there are more steps, move the sql into a separate file and run

time dbaccess <dbname> file.sql

btw, there's a quote missing from your code fragment.

抚笙 2024-08-20 20:58:24

我使用 SQLCMD 程序来完成此类工作。它具有基准测试模式(-B 选项),并且还可以更轻松地编写 SQL:

sqlcmd -d stores -B -e 'execute procedure foo(1)'

它是开源的,可以从 IIUG 软件存档

I use my SQLCMD program for this sort of job. It has a benchmark mode (-B option), and also makes it easier to write the SQL:

sqlcmd -d stores -B -e 'execute procedure foo(1)'

It is open source and available from the IIUG Software Archive.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文