获取动态sql的快照 [英] get snapshot for dynamic sql

查看:81
本文介绍了获取动态sql的快照的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我想获取每个sql语句的逻辑和物理读取

已执行。

之前,我使用命令db2 get snapshot for dynamic sql on

< mydatabase>。在那里,我可以看到来自

缓冲池的逻辑和物理读取,用于监控的每个语句。我是对的吗?

但现在,我想从表格中读取这些结果,以便我可以自动处理它们。哪个表是快照的结果

为动态sql存储?我感兴趣的值是声明文本,

逻辑和物理读取,CPU时间和总执行时间。


如果你有的话真的很棒对我有任何想法!


干杯,

Ina

解决方案

Ina Schmitz写道:

你好,

我想得到每个sql语句执行的逻辑和物理读取。
因此,我使用了命令" db2获取动态sql的快照
< mydatabase>"。在那里,我可以看到来自
缓冲池的逻辑和物理读取,用于监控的每个语句。我是对的吗?
但是现在,我想从表中读出这些结果,以便我可以自动处理它们。哪个表(s)是动态sql存储的快照结果?我感兴趣的值是声明文本,逻辑和物理读取,CPU时间和总执行时间。

如果你对我有任何想法,真的很棒!

欢呼,
Ina




最好的办法是搜索安装了DB2的在线文档

或在线提供:

http://publib.boulder.ibm.com/infoce...help/index.jsp

如果找不到,请告诉我们您使用的搜索参数回答

您正在寻找。

Jan M. Nelken


[...]

因此,我在
< mydatabase>"上使用了命令db2 get snapshot for dynamic sql。在那里,我可以看到来自
缓冲池的逻辑和物理读取,用于监控的每个语句。我是对的吗?
但是现在,我想从表中读出这些结果,以便我可以自动处理它们。哪个表是动态sql存储的快照结果?我感兴趣的值是
语句文本,逻辑和物理读取,cpu时间和总执行时间。


请告诉我们如果你不能使用哪些搜索参数找到答案
你正在寻找。



这已经是我做的第一件事 - 查看在线帮助。

我用过搜索参数:快照动态sql表

我刚刚发现SNAPSHOT_DYN_SQL没有给我我需要的
。也许pool_index_p_reads元素可以帮助我,但是我没有找到如何在sql语句中访问它的


如果能帮助我找到更好的搜索参数,那会很棒......


欢呼,

Ina


Ina Schmitz写道:

如果你能帮我找到更好的搜索论点会很棒...




Ina,


你的原稿内部问题是:


" ...哪个表是存储动态sql的快照的结果?

值,我是感兴趣的是声明文本,逻辑和物理

读取,cpu时间和总执行时间......


我将从搜索在线文档开始at:

http:// publib.boulder.ibm.com/infoce...help/index.jsp


带有SNAPSHOT BUFFER POOL TABLE FUNCTION字样。你会发现 -

大约在前10个点击中 - 一个表格函数,它接近你的b $ b满足你的一些要求。


你也可以尝试SNAPSHOT DYNAMIC SQL TABLE FUNCTION以找到另一个候选人的



从你自己的话来说 - 你正在寻找提供表格的功能动态sql的
快照。


为什么不搜索为动态SQL提供SNAPSHOT的TABLE FUNCTION?

Jan M. Nelken


Hello,

I would like to get the logical and physical reads for every sql statement
executed.
Thatfore, I used the command "db2 get snapshot for dynamic sql on
<mydatabase>". There, I could see the logical and physical reads from
bufferpool for every statement monitored. Am I right?
But now, I would like to read these results out of a table so that I could
process them automatically. In which table(s) are the results of snapshot
for dynamic sql stored? The values, I am interested in are statement text,
logical and physical reads, cpu time and total execution time.

Would be really great if you had any ideas for me!

Cheers,
Ina

解决方案

Ina Schmitz wrote:

Hello,

I would like to get the logical and physical reads for every sql statement
executed.
Thatfore, I used the command "db2 get snapshot for dynamic sql on
<mydatabase>". There, I could see the logical and physical reads from
bufferpool for every statement monitored. Am I right?
But now, I would like to read these results out of a table so that I could
process them automatically. In which table(s) are the results of snapshot
for dynamic sql stored? The values, I am interested in are statement text,
logical and physical reads, cpu time and total execution time.

Would be really great if you had any ideas for me!

Cheers,
Ina



The best idea would be to search online documentation intalled with DB2
or available online at:

http://publib.boulder.ibm.com/infoce...help/index.jsp

Please tell us what search arguments you used if you cannot find answer
you are looking for.
Jan M. Nelken


[...]

Thatfore, I used the command "db2 get snapshot for dynamic sql on
<mydatabase>". There, I could see the logical and physical reads from
bufferpool for every statement monitored. Am I right?
But now, I would like to read these results out of a table so that I
could process them automatically. In which table(s) are the results of
snapshot for dynamic sql stored? The values, I am interested in are
statement text, logical and physical reads, cpu time and total execution
time.

Please tell us what search arguments you used if you cannot find answer
you are looking for.


This was already the first thing I did - looking in the online help.
I used the search arguments: "snapshot dynamic sql table"
I just found out that the SNAPSHOT_DYN_SQL doesn''t give me what I
need.Perhaps the pool_index_p_reads element could help me, but I didn''t
found out how to access it in a sql statement.
Would be great if you could help me in finding better search arguments...

Cheers,
Ina


Ina Schmitz wrote:

Would be great if you could help me in finding better search arguments...



Ina,

Your original question was:

"...In which table(s) are the results of snapshot for dynamic sql stored?
The values, I am interested in are statement text, logical and physical
reads, cpu time and total execution time..."

I would start with searching online documentation available at:

http://publib.boulder.ibm.com/infoce...help/index.jsp

with SNAPSHOT BUFFER POOL TABLE FUNCTION words. You will find -
approximately within first 10 hits - a table function which closely
answers some of your requirements.

You may also try SNAPSHOT DYNAMIC SQL TABLE FUNCTION in order to find
out another candidate.

From your own words - you were looking for table function providing
snapshot for dynamic sql.

So why not search for TABLE FUNCTION providing SNAPSHOT for DYNAMIC SQL?
Jan M. Nelken


这篇关于获取动态sql的快照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆