473,387 Members | 1,492 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,387 software developers and data experts.

Use of MQTs

At one of the clinets I am working with, we are having a debate about
the use of MQTs or go with traditional way of creating aggregate
tables and populating them. I would go with the MQTs instead of the
traditional way.

Does anyone has any input as to which way is better from an apporach
point of view which would result that is better for an organization.

Any feedback is appreciated.

Thanks,
Suresh
Nov 12 '05 #1
5 4238
AK
is it DSS or OLTP?
do you plan to use REFRESH IMMEDIATE or REFRESH DEFERRED?
Nov 12 '05 #2
This is a DSS. And as an alternative to an MQT, they are planning to
go with an explicit aggregate table and maintain it manually. We need
to refresh the data once a day. So, REFRESH DEFERRED...
ak************@yahoo.com (AK) wrote in message news:<46**************************@posting.google. com>...
is it DSS or OLTP?
do you plan to use REFRESH IMMEDIATE or REFRESH DEFERRED?

Nov 12 '05 #3
my*****@gmail.com (Suresh) wrote in message news:<ef**************************@posting.google. com>...
This is a DSS. And as an alternative to an MQT, they are planning to
go with an explicit aggregate table and maintain it manually. We need
to refresh the data once a day. So, REFRESH DEFERRED...


I've got a warehouse with quite a few explicitely created summary
tables. I think that there's probably a value in both MQTs and
manually-managed summary tables. In my case I had a lot of SQL that
MQT's didn't support:
- declared temp tables
- order by (in order to get top X values)
- processes external to database (involving extraction, data mining
function, and reloading)
- UDFs
- I think that there were a few other restrictions as well at the
time that have been addressed in various fixpacks since 8.1.0.

Additionally, most of the access to these summary tables was by a
custom-developed application. This simple application was able to be
coded directly against the summary tables. While that involved a bit
of education of the programmers - it didn't involve *any* work in
trying to figure out why DB2 was or wasn't rewriting a query properly.
Plus - some queries would never be eligible for rewrite anyway.

In my case manual summary tables have worked fine. However, I am
planning to implement some MQTs for an adhoc environment that I've
got. In this environment it isn't practical to educate the users or
customize the application to support a dozen summary tables - so DB2's
rewriting of queries is really the best choice.

buck
Nov 12 '05 #4
Thanks for your response.
I understand in cases where MQTs can not be created, an explicit
summary table can be used.
But, the argument is that DB2 optimizer does something goofy in the
way it selects the MQT when querying the base tables. And it is a lot
of maintenance for a DBA. But it is my understanding that you can
create an MQT and disable the optimizer not to select MQT when
querying the base tables as a start.

But, instead of maintaining a explict summary table and make sure it
is loaded properly, why not use an MQT and load it deferred and use
the MQT directly when querying.

-Suresh

bu*********@yahoo.com (Buck Nuggets) wrote in message news:<66**************************@posting.google. com>...
my*****@gmail.com (Suresh) wrote in message news:<ef**************************@posting.google. com>...
This is a DSS. And as an alternative to an MQT, they are planning to
go with an explicit aggregate table and maintain it manually. We need
to refresh the data once a day. So, REFRESH DEFERRED...


I've got a warehouse with quite a few explicitely created summary
tables. I think that there's probably a value in both MQTs and
manually-managed summary tables. In my case I had a lot of SQL that
MQT's didn't support:
- declared temp tables
- order by (in order to get top X values)
- processes external to database (involving extraction, data mining
function, and reloading)
- UDFs
- I think that there were a few other restrictions as well at the
time that have been addressed in various fixpacks since 8.1.0.

Additionally, most of the access to these summary tables was by a
custom-developed application. This simple application was able to be
coded directly against the summary tables. While that involved a bit
of education of the programmers - it didn't involve *any* work in
trying to figure out why DB2 was or wasn't rewriting a query properly.
Plus - some queries would never be eligible for rewrite anyway.

In my case manual summary tables have worked fine. However, I am
planning to implement some MQTs for an adhoc environment that I've
got. In this environment it isn't practical to educate the users or
customize the application to support a dozen summary tables - so DB2's
rewriting of queries is really the best choice.

buck

Nov 12 '05 #5
my*****@gmail.com (Suresh) wrote in message news:<ef*************************@posting.google.c om>...
But, instead of maintaining a explict summary table and make sure it
is loaded properly, why not use an MQT and load it deferred and use
the MQT directly when querying.


Well, extra and unnecessary dependencies I suppose. My explicit
summary tables are very easy to manage and publish from. And - have
no dependencies on underlaying tables - which are tweaked about every
few months - either due to large data quality conversions or to major
feature upgrades.

buck
Nov 12 '05 #6

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

Similar topics

8
by: Paul Reddin | last post by:
Hi, I am trying to investigate if some of our fairly complex views couldn't be materialised with MQT's. Unfortunately the error message returned when the fullselect is invalid is as shown at...
17
by: p175 | last post by:
If I have ESE 8.2.5, I assume v9 will be able to take such an installation and upgrade same without problems ? I'm investigating whether we can also use Express C as a development / test...
3
by: jefftyzzer | last post by:
Friends, Say I have the following UDF: CREATE FUNCTION GET_MONTH(P_DATE DATE) RETURNS INTEGER INHERIT SPECIAL REGISTERS SPECIFIC GET_MONTH DETERMINISTIC BEGIN ATOMIC
2
by: hello_db2 | last post by:
hello, db2advis gave me error like execution started at timestamp 2006-11-15-09.51.37.046473 Using the default table space name USERSPACE1 Recommending indexes... Recommending MQTs......
9
by: Veeru71 | last post by:
Can someone point me to good documentation on 'WITH clause" ? (I couldn't get much out of Queries section from SQL Reference manual). We are getting better performance when we explicity use global...
2
by: jefftyzzer | last post by:
Friends: I've been working on tuning a fairly complex--and certainly vexing-- query. Several days ago I created an MQT which aided the query and dropped its cost from 3.4 million timerons to...
1
by: BD | last post by:
Hi there. I'm attempting to implement MQTs to improve performance on some nasty SQL. In the Oracle world, if I recall, materialized views must use tables as underlying objects - ie., they...
3
by: BD | last post by:
I'm doing some cross-platform development, under LUW 8.2 (Windows) for z/OS 8. I have some fairly complex queries which address some rather large tables. One query takes approximately 30...
11
by: peter | last post by:
I am trying to get a SQL stored procedure to use user maintained MQT implicitly which raises questions on when they are used or not used. In theory you would expect the stored procedure to pick up...
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.