By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,208 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,208 IT Pros & Developers. It's quick & easy.

actual/estimated cost/cardinality of query plan

P: n/a
is there a way to see the actual (not just estimated) cost and
cardinality at each plan operator? SQL Server and Oracle has such
feature but I failed to find a way in DB2 yet (up to V9.5)

Oct 15 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<uw****@gmail.comwrote in message
news:d5**********************************@31g2000p rz.googlegroups.com...
is there a way to see the actual (not just estimated) cost and
cardinality at each plan operator? SQL Server and Oracle has such
feature but I failed to find a way in DB2 yet (up to V9.5)
The cardinality is in the catalog tables, particularly syscat.indexes
(assuming you executed runstats "with indexes all" option).
Oct 15 '08 #2

P: n/a
On Oct 15, 11:25*pm, "Mark A" <some...@someone.comwrote:
<uwc...@gmail.comwrote in message

news:d5**********************************@31g2000p rz.googlegroups.com...
is there a way to see the actual (not just estimated) cost and
cardinality at each plan operator? *SQL Server and Oracle has such
feature but I failed to find a way in DB2 yet *(up to V9.5)

*The cardinality is in the catalog tables, particularly syscat.indexes
(assuming you executed runstats "with indexes all" option).
I always get the cardinality of tables and indexes, I think. Please
check if

set current explain mode explain
set current explain snapshot explain
<query>
set current explain mode no
set current explain snapshot no
[...]
db2exfmt ...

makes a difference. The trick is to use both explain mode and explain
snapshot. (Recited from memory, so check syntax.)
Oct 18 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.