View are supposed to be performance neutral...

Meaning no better or worse performance than having the statement embedded
in another.

If you're not seeing that, then it's PMR time.

However, one thing I've being meaning to play around with is views built
over a UDTF that takes parms...looking at some IBM views as examples...
qsys2.record_lock_info view --> qsys2.record_lock_info() UDTF
qsys2.message_queue_info view --> QSYS2.MESSAGE_QUEUE_INFO() UDTF
(among others)

Charles

On Fri, Aug 24, 2018 at 12:56 PM Thomas Garvey <tgarvey@xxxxxxxxxx> wrote:

Hi,

I'm developing a new application and trying to have the DB do as much of
the work as possible.
So, I'm incorporating SQL Views but finding the throughput underwhelming.
Granted that some of the views are based on other views (in keeping with
the attempt to have the DB do some work for me)
but it appears that every time a view is queried the views are rebuilt
by the OS.

I read somewhere that Views can be considered somewhat like logical
files, but at least logicals
can be set to have immediate updates as underlying physicals change.
Views have no such attribute settings.

So, what's considered best practices for SQL Views?
Should I just rewrite these things as logicals?

--

Best Regards,

Thomas Garvey


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].