Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Location
    Madrid - Spain
    Posts
    422
    Provided Answers: 1

    Unanswered: how to look the access plan in the querys?

    Hi Colleagues,

    Somebody can say me how to look the access plan in a querys execute in database DB2 8.1.
    Thank you for you advanced.

  2. #2
    Join Date
    Nov 2011
    Posts
    24
    If you are using DB2 datastudio you can select the query and right click & choose "Open visual explain"

  3. #3
    Join Date
    Dec 2002
    Location
    Madrid - Spain
    Posts
    422
    Provided Answers: 1
    Thank you for you answer, I do not have no tools graphics, I need executing in command line.

    Thank you.

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Mar 2003
    Posts
    280
    Quote Originally Posted by georgipa View Post
    Thank you for you answer, I do not have no tools graphics, I need executing in command line.

    Thank you.
    db2 connect to <db>
    db2 "explain plan for <sql query>"
    db2exfmt -d <db> | less -S
    <enter><enter>....<enter>

    Make sure you have explain tables in place (you will be noticed if not). I don't recall where EXPLAIN.DDL where located i V8, but in 9.x it is in ~<instanceowner>/sqllib/misc/
    --
    Lennart

Posting Permissions

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