If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Result of EXPLAIN query in IBM DataStudio

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-23-11, 16:01
merik merik is offline
Registered User
 
Join Date: Apr 2011
Posts: 32
Result of EXPLAIN query in IBM DataStudio

I'm using IBM Data Studio in Ubuntu, and when I run a query like this:

Code:
EXPLAIN ALL FOR SELECT field FROM table;
All I get is this:

Code:
Run SQL

EXPLAIN ALL FOR SELECT field FROM table
Success
 
Query execution time => 23 ms
 
Total execution time => 23 ms
I don't see the actual result of EXPLAIN. What am I doing wrong?

Last edited by merik; 05-23-11 at 16:07. Reason: found answer to second part
Reply With Quote
  #2 (permalink)  
Old 05-23-11, 21:10
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
AFAIK, this saved the expalain plan for the query in the explain tables.
Not sure how you view the saved explain plan in DataStudio.
In Control Centre, right clicking on the database name, there will be a menu item, 'show explain table history'. check if datastudio has something similar

hth

sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 05-24-11, 04:21
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
You could (and should) instead use the "Visual Explain" component of Data Studio.
First right click on the connection and select "enable Visual Explain".
This will create all necessary explain tables for you.
Then click on the "visual explain" toolbar to obtain a graphical representation of the explain output.
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #4 (permalink)  
Old 06-01-11, 15:14
merik merik is offline
Registered User
 
Join Date: Apr 2011
Posts: 32
Thanks Peter. It helped a lot.
Reply With Quote
  #5 (permalink)  
Old 10-26-11, 16:09
maivo maivo is offline
Registered User
 
Join Date: Oct 2011
Posts: 1
I can't find "Enable Visual Explain" when I right clicked the connection.
Reply With Quote
  #6 (permalink)  
Old 10-26-11, 16:29
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Why don't you use db2exfmt instead of GUI tools.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On