473,399 Members | 3,832 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,399 software developers and data experts.

MQTs under z/OS - how to get IMMEDIATE REFRESH functionality

BD
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 seconds to complete, once the result
set has been loaded into buffer caches. The initial run of the query
is about 2 minutes.

I created an MQT, and that sped up the performance of my query
considerably.

Although I was able to structure the fullselect to 'obey the laws' for
'REFRESH IMMEDIATE' MQTs under LUW, I appear to be out of luck under z/
OS, simply because, according to the dox I've read, z/OS does not
offer REFRESH IMMEDIATE as an option. It's important that the MQT is
kept well up-to-date with its source tables.

I thought of putting a trigger on the source tables to initiate a
REFRESH TABLE command, but the list of 'allowed' statements which a
trigger can, well, trigger - does not appear to include 'REFRESH
TABLE'.

Best I can find, by scouring the group and other forums, is a solution
that involves creating a trigger that calls a stored procedure, which
initiates a REFRESH TABLE.

Has anyone else found a slightly more intuitive solution for this
problem? Am I incorrect in my conclusion that IMMEDIATE REFRESH is not
supported under z/OS UDB?

Jun 27 '08 #1
3 3359
BD
Has anyone else found a slightly more intuitive solution for this
problem? Am I incorrect in my conclusion thatIMMEDIATEREFRESH is not
supported underz/OSUDB?
Anyone? Anyone?? ...Beuller?
Jun 27 '08 #2
BD wrote:
>Has anyone else found a slightly more intuitive solution for this
problem? Am I incorrect in my conclusion thatIMMEDIATEREFRESH is not
supported underz/OSUDB?

Anyone? Anyone?? ...Beuller?
To the best of my knowledge REFRESH IMMEDIATE is not supported in DB2
for zOS.
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 27 '08 #3
BD
To the best of my knowledge REFRESH IMMEDIATE is not supported in DB2
for zOS.
This is my understanding as well - what I'm trying to establish is a
mechanism of maintaining an MQT with some assurance that updates to it
will remain closely tied with updates to its source tables. I'm okay
with relying on triggers and stored procs, but have not (for example)
had success in coding a stored proc which calls a 'refresh table'
statement, even though it's mentioned in the z/OS SQL guide as a
supported statement for a stored proc.

I recognize that I cannot initiate a REFRESH TABLE from within a
trigger directly - I've read in the SQL dox about the dozen-or-so
valid statements for triggers.

I believe I should be able to code a stored proc to do it, but the
following proc does not compile:

CREATE PROCEDURE MYSCHEMA.MQTREFRESH ()
LANGUAGE SQL
BEGIN
REFRESH TABLE MQT1;
END

It returns an 'unexpected token "REFRESH TABLE"' message, expecting a
token of "SPACE"

If I schema-qualify the MQT name, returns an "unexpected token
MQT1...following MYSCHEMA." message.

Please don't misunderstand - I'm not looking for help coding a stored
proc (I recognize I'm not particularly experienced with them, either).
I'm simply trying to understand how, under z/OS, do DBAs who want the
IMMEDIATE REFRESH functionality of an MQT, get that kind of
functionality? If I want an MQT with some assurance that updates to it
will occur as closely as possible in time to the updates on the source
tables, what's the best strategy, in the absence of an IMMEDIATE
REFRESH MQT?

Do people build tables manually, and rely on manually-coded triggers,
somehow 'emulating' the immediate functionality?

Thanks kindly for the response...

BD
Jun 27 '08 #4

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

Similar topics

8
by: Bilal | last post by:
Hi I have an application with numerous pages. A couple of these pages include a functionality that allows it to be refreshed every 15 secs. My problem is that this "refreshing" works too well: THe...
6
by: Matt | last post by:
By using javascript, is it possible to disable the REFRESH functionality (F5 or refresh icon) in a browser? Please advise. Thanks!!
5
by: Suresh | last post by:
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...
4
by: Tony | last post by:
Hello, Using Access2000, WinNT. Using the Immediate Window, I can view the results of my VBA code as it performs operations/calculations on my data. Now that I have all the bugs worked out,...
3
by: Ford Desperado | last post by:
Hi, I've got an ASP.Net page that displays some data from a database. I have a refresh button on the page that works just fine. If I try to utilize the browser's Refresh button, I get an...
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
3
by: Jay | last post by:
Hello all, Is it possible to mimic the Ctrl. + Refresh functionality with a button in a webpage using javascript, ideally by placing a button(or link) on a page that when clicked would have the...
4
by: kiss deez | last post by:
Hello, I am trying to test various math functions through the immediate window while in design mode (I have a 64 bit system). For example, I have the following function: Public Function...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.