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