Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How? REFRESH TABLE of MQT in V5R3?

Posted on 2008-10-02
2
Medium Priority
?
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 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