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 > Getting old data with db2exfmt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-23-10, 15:24
amolk amolk is offline
Registered User
 
Join Date: Jul 2010
Posts: 4
Exclamation Getting old data with db2exfmt

Hi all when I run db2exfmt -d dbname
I am getting data of the first query I fired after I turned on explain
here are the commands that I used
db2 -tf ~/sqllib/MISC/EXPLAIN.DDL
db2 set current explain mode explain
select * from mytable
db2exfmt -d mydatabase -1 -o myoutput.txt

I got the output correctly in myoutput.txt

But now when I do
select * from mynewtable
db2exfmt -d mydatabase -1 -o mynewoutput.txt

I get out analysis of select * from mytable in mynewoutput.txt
Not sure why i am not getting the output of last run select statement any help on this ? I think db2exfmt -1 is latest ?
Reply With Quote
  #2 (permalink)  
Old 12-23-10, 16:27
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Just run the following:

db2exfmt -d mydatabase

and hit enter at each prompt to get the last explain done.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 12-23-10, 23:57
amolk amolk is offline
Registered User
 
Join Date: Jul 2010
Posts: 4
Question

Quote:
Originally Posted by Marcus_A View Post
Just run the following:

db2exfmt -d mydatabase

and hit enter at each prompt to get the last explain done.
I have tried this as well with no luck
How do i delete all the records and obtain the only required one.
Am I going wrong some where do need to do a
db2 set current explain mode no
after executing every query ?

Please let me know I am new to this stuff.
Reply With Quote
  #4 (permalink)  
Old 12-24-10, 12:08
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
db2 set current explain mode no , then db2exfmt.
__________________

Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
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