Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2010
    Posts
    4

    Exclamation Unanswered: 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 ?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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.

  4. #4
    Join Date
    Oct 2004
    Location
    DELHI INDIA
    Posts
    338
    db2 set current explain mode no , then db2exfmt.

    Jayanta Datta
    DB2 UDB DBA
    IBM India, Global Delivery
    New Delhi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •