Solved

How? REFRESH TABLE of MQT in V5R3?

Posted on 2008-10-02
2
313 Views
Last Modified: 2012-05-05
Per DOCs ....
I quote
        "You should avoid using the REFRESH TABLE statement to update user-maintained materialize query tables."
and again
        "Use insert, update, delete, or load operations might be more efficient than using the REFRESH TABLE statement."

Can I please get sample refresh syntax ..... if my MQT table was named MYLIB.MYTABLE



0
Comment
Question by:volking
2 Comments
 
LVL 5

Author Comment

by:volking
ID: 22626170
P.S. Below does work ... wonder why I should "AVOID USING"?

REFRESH TABLE MYLIB.MYTABLE;

Volking
0
 
LVL 27

Accepted Solution

by:
tliotta earned 500 total points
ID: 22627531
Volking:

I think it simply comes down to the resources necessary to effect a manual REFRESH. If you're going to go that route, it's far less resource intensive simply to use a VIEW (or VIEWs) over the actual data.

A REFRESH essentially starts with a CLRPFM. It then runs according to the SQL that defines the MQT and does all of the physical I/O that that implies, copying all data into the MQT table.

Why run all of that when a VIEW can go straight to the real data with no intermediate physical I/O?

Note that it is necessary to determine the value of MQTs before deciding to implement them. The value appears to be in the summarization of lots of data. As new releases of i5/OS come out, the capabilities of MQTs increase. They were just introduced in a basic form in V5R3 to let developers learn about them. V5R4 added details and V6R1 has added more.

The V5R3 implementation is something like giving you what you need to create a "Hello, World" kind of MQT. None of the nicer stuff was available yet.

Even so, if a MQT isn't really appropriate for a business problem, maybe it shouldn't be used.

Here's one possible informative resource -- Creating and using materialized query tables (MQT) in IBM DB2 for i5/OS, by Michael W. Cain, DB2 for i5/OS Center of Competency:

http://www-304.ibm.com/jct09002c/partnerworld/wps/servlet/ContentHandler/SROY-6UZ5E6

It includes a lot of V5R4 references, so it might not be as helpful as it could be for you. But it might help you decide if a MQT fits your needs and how it should be handled.

Tom
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now