... but keep in mind a MQT is not automatically refreshed when inserting,
updating or deleting rows in the base tables (still missing this feature),
so there can be a gap between the real data and the data in the MQT.
Refreshing the MQT before accessing it, is time consuming especially for big
tables (because a CLRPF is performed and then the query executed before the
result is written to the MQT). Also you need *EXCLUSIVE access authority
when refreshing an MQT.
A view with UNION all and the "right" indexes on the base tables will be the
best solution.
A view does not have a key, but an ORDER BY can be specified when accessing
the view.
I'd not access a view with native I/O, but change the access to embedded
SQL.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization ? Education ? Consulting on IBM i
IBM Champion since 2020
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
"Train people well enough so they can leave, treat them well enough so they
don't want to. " (Richard Branson)
"Learning is experience ? everything else is only information!" (Albert
Einstein)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin
Taylor
Sent: Wednesday, 2 August 2023 21:17
To: MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Replace multi-format LF?
I don't want to clone the functionality. That inevitably leads to the
clones diverging and giving different results.
It looks like I can do it with an MQT and an index.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.