我是靠谱客的博主 大胆红牛,最近开发中收集的这篇文章主要介绍查看DB2执行计划,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

[db2inst1@gzdbtsvr4 /home/db2inst1]#su - eser
eser's Password: 
$ cd /home/db2inst1/sqllib/bin
$ db2 conect to esnew
DB21034E  The command was processed as an SQL statement because it was not a 
valid Command Line Processor command.  During SQL processing it returned:
SQL1024N  A database connection does not exist.  SQLSTATE=08003
$ db2 connect to esnew

   Database Connection Information

 Database server        = DB2/AIX64 10.5.8
 SQL authorization ID   = ESER
 Local database alias   = ESNEW

$ db2 set current explain mode explain
DB20000I  The SQL command completed successfully.
$ db2 "select * from sysibm.sysdummy1"
SQL0217W  The statement was not executed as only Explain information requests 
are being processed.  SQLSTATE=01604
$ db2exfmt -d esnew -g TIC -w -l -s % -n % -o db2exmt.out
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DATABASE 2 Explain Table Format Tool

Connecting to the Database.
Connect to Database Successful.
Enter up to 26 character Explain timestamp (Default -1) ==> 
Enter section number (0 for all, Default 0) ==> 
Unable to open output file.
$ ls ~/jupiter/
ls: 0653-341 The file /home/eser/jupiter/ does not exist.
$ ls ~/
create_pro.sql  tuning
$ db2exfmt -d esnew -g TIC -w -l -s % -n % -o ~/db2exmt.out
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DATABASE 2 Explain Table Format Tool
Connecting to the Database.
Connect to Database Successful.
Enter up to 26 character Explain timestamp (Default -1) ==> 
Enter section number (0 for all, Default 0) ==> 
Output is in /home/eser/db2exmt.out.
Executing Connect Reset -- Connect Reset was Successful.
$ more /home/eser/db2exmt.out

=======================================================
1.db2 conect to esnew
2.db2 set current explain mode explain
3.db2 "sql_statment"
4.db2exfmt -d esnew -g TIC -w -l -s % -n % -o ~/db2exmt.out
5. more /home/eser/db2exmt.out

转载于:https://my.oschina.net/u/2277088/blog/3019113

最后

以上就是大胆红牛为你收集整理的查看DB2执行计划的全部内容,希望文章能够帮你解决查看DB2执行计划所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部