显示解释计划 [英] show explain plan

查看:81
本文介绍了显示解释计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我没有成功展示解释计划。我使用IBM DB2 Universal

数据库8.2。


表EXPLAIN_STATEMENT和EXPLAIN_INSTANCE存在。使用VESAMPL.DDL,我加载了预定义的执行计划。

在下一步中,我想显示加载的访问计划。所以,我正确

点击显示解释的陈述历史记录得到了结果:

" [IBM] [CLI Driver] [DB2 / NT] SQL0104N AufION FROM [...] folgte das

unerwartete Token"。"。 Zu den m?glichen Token geh?ren:,。 SQLSTATE = 42601

"

对不起,我使用德语版的DB2,所以错误消息

是德语同样。但是我希望,有些人会理解他们的价值。

任何人都可以帮我解决那里出了什么问题以及为什么Visual Explain

没有在这里工作?


我的下一个尝试是使用db2expl来显示解释计划。

所以我打开db2cmd并转到bin目录调用:db2expln -d

SAMPLE -t" SELECT * FROM cl_sched" ;.

不幸的是,我现在收到错误消息:服务器无法

为错误报告建立一个缓冲区。

所以在这里,解释计划的显示也不成功。


如果有人知道如何展示解释计划会很棒。


干杯,

Ina

Hello all,

I don''t succeed in displaying the explain plan. I use IBM DB2 Universal
Database 8.2.

I tried to do the example given in the online help for "Visual Explain".
The tables EXPLAIN_STATEMENT and EXPLAIN_INSTANCE exist. With VESAMPL.DDL, I
loaded the predefined execution plans.
In the next step, I''ld like to display the loaded access plans. So, I right
clicked on "Show Explained Statements History" and got the result:
"[IBM][CLI Driver][DB2/NT] SQL0104N Auf "ION FROM [...]" folgte das
unerwartete Token ".". Zu den m?glichen Token geh?ren: ",". SQLSTATE=42601
"
I am sorry, but I work with a German Edition of DB2, so the error messages
are in German as well. But I hope, there are some people who understand
them.
Could anyone help me what went wrong there and why the Visual Explain
doesn''t work here?

My next try was to use db2expl to show the explain plan.
So I opened db2cmd and went to the bin directory and called: db2expln -d
SAMPLE -t "SELECT * FROM cl_sched".
Unfortunately, I now got the error message: "The server was unable to
establish a buffer for error reporting."
So also here, the display of the explain plan wasn''t successful.

It would be great if anyone knows an idea how to display the explain plan.

Cheers,
Ina

推荐答案

Ina Schmitz写道:
Ina Schmitz wrote:
大家好,

我没有成功地展示解释计划。我使用IBM DB2 Universal
数据库8.2。

我试图在Visual Explain的在线帮助中给出示例。
表EXPLAIN_STATEMENT和EXPLAIN_INSTANCE存在。使用VESAMPL.DDL,我加载了预定义的执行计划。
在下一步中,我想显示加载的访问计划。所以,我正确点击了显示解释的陈述历史。得到了结果:[IBM] [CLI驱动程序] [DB2 / NT] SQL0104N AufION FROM [...] folgte das
unerwartete Token。。 Zu den m?glichen Token geh?ren:,。 SQLSTATE = 42601
 
我很抱歉,但我使用的是德语版的DB2,因此错误消息
也是德语版。但是我希望,有些人会理解他们。
任何人都可以帮我解决那里出了什么问题以及为什么Visual Explain
在这里不起作用?

我的下一个尝试是使用db2expl来显示解释计划。
所以我打开db2cmd并转到bin目录并调用:db2expln -d
SAMPLE -tSELECT * FROM cl_sched。
不幸的是,我现在收到错误消息:服务器无法为错误报告建立缓冲区。
所以在这里,解释计划的显示不是''成功。

如果有人知道如何展示解释计划会很棒。

干杯,
Ina
Hello all,

I don''t succeed in displaying the explain plan. I use IBM DB2 Universal
Database 8.2.

I tried to do the example given in the online help for "Visual Explain".
The tables EXPLAIN_STATEMENT and EXPLAIN_INSTANCE exist. With VESAMPL.DDL, I
loaded the predefined execution plans.
In the next step, I''ld like to display the loaded access plans. So, I right
clicked on "Show Explained Statements History" and got the result:
"[IBM][CLI Driver][DB2/NT] SQL0104N Auf "ION FROM [...]" folgte das
unerwartete Token ".". Zu den m?glichen Token geh?ren: ",". SQLSTATE=42601
"
I am sorry, but I work with a German Edition of DB2, so the error messages
are in German as well. But I hope, there are some people who understand
them.
Could anyone help me what went wrong there and why the Visual Explain
doesn''t work here?

My next try was to use db2expl to show the explain plan.
So I opened db2cmd and went to the bin directory and called: db2expln -d
SAMPLE -t "SELECT * FROM cl_sched".
Unfortunately, I now got the error message: "The server was unable to
establish a buffer for error reporting."
So also here, the display of the explain plan wasn''t successful.

It would be great if anyone knows an idea how to display the explain plan.

Cheers,
Ina



调用DB2支持!

indika


Call DB2 support !

indika


>调用DB2支持!

不是真正的帮助,因为我正在撰写我的文凭,并且只有DB2的评估版本的

。作为一名学生,我没有钱花在

支持上。


希望,其他人可以帮助我。


干杯,

ina
> Call DB2 support !
Not really a help, because I am writing on my diploma and just have the
evaluation version of DB2. As a student, I don''t have the money to spend on
support.

Hope, someone else could help me.

Cheers,
ina


Ina Schmitz写道:
Ina Schmitz wrote:
调用DB2支持!



不是真正的帮助,因为我正在写我的文凭并且只有DB2的评估版本。作为一名学生,我没有钱花在
支持上。

希望,别人可以帮助我。

干杯, ina



Not really a help, because I am writing on my diploma and just have the
evaluation version of DB2. As a student, I don''t have the money to spend on
support.

Hope, someone else could help me.

Cheers,
ina



非常可疑。让我们以更具建设性的方式解决这个问题:

cd到sqllib / misc

连接到你的数据库。

设置你当前的架构除了常规用户ID之外的其他东西。

" ina2"为了论证的缘故


db2 connect to< db>

db2 set current schema ina2

db2 -tvf EXPLAIN .DDL

所以..现在开始了一个新的开始(记得要对表进行限定,你在

ina2 ..)

db2"解释计划选择.....

db2exfmt -d< db> -e ina2 -o test.exfmt

<接受所有默认值>

假设工程尝试相同的解释计划/ db2 exfmt in yoru regular

架构。如果它失败了你可能会以某种方式损坏解释表。

只需删除它们并重新运行EXPLAIN.DDL。


如果那不起作用让矿石变得有趣:-)

干杯

Serge


PS;我确实有一个更为牵强的怀疑。如果你的一个标识符(撇号,双引号,......)中有一些有趣的

字符

那么该工具总是有可能不够硬化反对

thouse。那将是DB2 bug。

-

Serge Rielau

DB2 SQL编译器开发

IBM多伦多实验室


Very dubious. Let''s approach thsi in a more constructive fashion:
cd to sqllib/misc
connect to your database.
set your current schema to something else than your regular userid.
"ina2" for the sake of the argument

db2 connect to <db>
db2 set current schema ina2
db2 -tvf EXPLAIN.DDL
So.. now on to a fresh start (remember to qualify the tables, you''re in
ina2..)
db2 "explain plan for select ....."
db2exfmt -d <db> -e ina2 -o test.exfmt
<accept all defaults>
Assuming that works try the same explain plan /db2 exfmt in yoru regular
schema. If it fails you may have somehow corrupted the explain tables.
Just drop them and rerun EXPLAIN.DDL.

If that doesn''t work things will get ore interesting :-)

Cheers
Serge

PS; I do have one more far-fetched suspicion. If you have funny
characters in one of your identifiers (apostrophe, double quotes, ...)
there is always a chance that the tool isn''t hardened enough against
thouse. That would be DB2 bug then.
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab


这篇关于显示解释计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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