473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

query on query plan and MQT

i have two questions:

1. A query plan only shows estimated cost and size at each operator.
is it possible to show the actual cost/cardinality of each plan
operator after running the query?

2. I created user-defined MQT with "enable optimization" option, and
bring it out of integrity pending state, however, I found the query
optimizer will never use this MQT for query processing. Is there any
reason for it? (how shall i debug)?

thanks
Sep 17 '08 #1
3 1836
Ian
uw****@gmail.com wrote:
i have two questions:

1. A query plan only shows estimated cost and size at each operator.
is it possible to show the actual cost/cardinality of each plan
operator after running the query?
No.

There was a research project called the Learning Optimizer (LEO) that
intended to provide a feedback loop -- so DB2 can compare the
optimizer's estimates with reality -- but I don't know what happened
to this project.

It appears as though some of this work went into the brains behind
automatic statistics profiles. But I would imagine that any actual
information would not be externalized.
2. I created user-defined MQT with "enable optimization" option, and
bring it out of integrity pending state, however, I found the query
optimizer will never use this MQT for query processing. Is there any
reason for it? (how shall i debug)?
What does your query plan tell you? You'll get output in db2exfmt as
to why MQTs were or were not used.
Sep 17 '08 #2
Thanks Ian for the first question.
2. I created user-defined MQT with "enable optimization" option, and
bring it out of integrity pending state, however, I found the query
optimizer will never use this MQT for query processing. Is there any
reason for it? (how shall i debug)?

What does your query plan tell you? You'll get output in db2exfmt as
to why MQTs were or were not used.
I doult this will happen. DB2 is trying to match each subquery to each
MQT in its catalog. will it tell me the matching result of this N:N
matching algorithm in its query plan?
Sep 18 '08 #3
Did you run runstats on the MQT?
Sep 18 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Brian Oster | last post by:
After applying security patch MS03-031 (Sql server ver 8.00.818) a query that used to execute in under 2 seconds, now takes over 8 Minutes to complete. Any ideas on what the heck might be going...
3
by: Andrew Mayo | last post by:
There is something very strange going on here. Tested with ADO 2.7 and MSDE/2000. At first, things look quite sensible. You have a simple SQL query, let's say select * from mytab where col1 =...
3
by: Paul Mateer | last post by:
Hi, I have been running some queries against a table in a my database and have noted an odd (at least it seems odd to me) performance issue. The table has approximately 5 million rows and...
14
by: Bob | last post by:
Hi there, Need a little help with a certain query that's causing a lot of acid in my stomach... Have a table that stores sales measures for a given client. The sales measures are stored per...
11
by: Eugenio | last post by:
Excuse me in advance fo my little English. I've got this stored procedure **************************************************************************** ********** declare @Azienda as...
2
by: jim_geissman | last post by:
I would like to save a query plan (estimated or actual) created in Query Analyzer -- paste it into a document, or simply print. It doesn't seem to be possible to select and copy the Execution...
0
by: apb18 | last post by:
A bit of query plan strangeness. Suppose you have an inheritance tree such that the columns 'ID' and 'field' appear in the top level table, call that table XXX. tables YYY and ZZZ both inherit...
8
by: Együd Csaba | last post by:
Hi All, how can I improve the query performance in the following situation: I have a big (4.5+ million rows) table. One query takes approx. 9 sec to finish resulting ~10000 rows. But if I run...
6
by: Ryan | last post by:
I came across a situation that I've been unable to explain and was hoping somebody had an answer: I had written an update query which was taking about 8 seconds to run and considered it too...
7
by: stig | last post by:
hi. coming from postgresql, i am used to textual references to most of the things i do with the database. i feel a little lost with all the graphical. i have few questions regarding MS SQL 2000...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.