try dynexpln also
Dynexpln describes the access plan selection for SQL statements entered
intothe application.
dynexpln [[-d <database>] [-f <input file>] [-g] [-i] [-t|-o <output
file>]
[-r] [-q <SQL statement>] [-u <userid> <password>] [-z
<delimiter>]]
[-h|-?]
Input fields:
-d <database> = database name to connect to
-f <input file> = name of file containing SQL
statements to describe
-g = show optimizer plan graphs
-h = help
-i = show operator ID numbers
-o <output file> = name of output file
-q <SQL statement> = SQL statement(s) to describe
-r = federated (remote) query
-t = terminal output desired
-u <userid> <password> = userid and password for
connecting to database
-z <delimiter> = character used to delimit SQL
statements (default is no delimiter)
-? = help
Thanks&Regards,
Amit
"deepak" <db2udbdba-ezmlmshield-x93153048.[Email address protected]
11/26/2004 02:50 AM
To: "LazyDBA Discussion" <[Email address protected]
cc: (bcc: Amit Nair/HAM/AM/HONDA)
Subject: RE: How to use Explain Plan - To find cost of Query
Use db2expln
-----Original Message-----
From: SaiPrasad
[mailto:db2udbdba-ezmlmshield-x90678231.[Email address protected]
Sent: Fri 11/26/2004 12:32 PM
To: LazyDBA Discussion
Cc:
Subject: How to use Explain Plan - To find cost of Query
Hi
I want to find the cost of query i use.
I hope explain Plan is the command .
db2 => explain plan for select cs.model,cs.vemail,cs.made
cs_made,cs.updat,cs.subscrib, \
db2 (cont.) =>
cs.spcl1,cs.spcl2,cs.spcl3,cs.spcl4,cs.spcl5,cs.spcl6,cs.spcl7,cs.spcl8,
\
db2 (cont.) => ct.to_page, ct.made
ct_made,ct.campaign \
db2 (cont.) => from cust_spec cs, click_thru ct \
db2 (cont.) => where cs.vemail=ct.vemail
DB20000I The SQL command completed successfully.
How to find the cost of the above query.
With regards
saiprasad
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DISCLAIMER:
This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended
recipient you should not disseminate,distribute,store,print, copy or
deliver this message.Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and delete this e-mail from your
system.E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted,corrupted,lost,destroyed,arrive late
or incomplete or contain viruses.The sender therefore does not accept
liability for any errors or omissions in the contents of this message
which arise as a result of e-mail transmission. If verification is
required please request a hard-copy version.
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page