× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



In another thread, I asked how to query system tables to get a list of all
of the source members on the system. (That thread was primarily a
discussion of the PTF groups required to get this new functionality.) The
query to do this is:
select * from qsys2.syspartitionstat
where source_type is not null

I am now able to run this query. The performance is very disappointing.
The above query returns results within several seconds, but do any row
selection or ordering, and you may as well go take a lunch break.

Since they’ve disabled the Database part of System Navigator in our shop,
I’m limited to using STRDBG and then run the query with the selection and
ordering to get advice on how to optimize it. (Does Data Studio have this
functionality?) The advisor suggested building an access path on QADBXREF
using fields DBXREL & DBXATR. Curious, I did a DSPFD on qsys2/syspstat and
found the CREATE VIEW statement used to create the file. It was here where
I realized just how little I know about SQL. The FROM clause really threw
me; I’ve never seen the “LATERAL” (synonymous with “TABLE”) keyword before,
and after reviewing the SQL Reference, I’m no closer to understanding it.
Can anyone explain to me what the following is doing?
FROM QSYS.QADBXREF A,
LATERAL (SELECT * FROM TABLE
(QSYS2.PARTITION_STATISTICS(A.DBXLIB, A.DBXFIL) ) AS X )
AS B
WHERE A.DBXATR IN ('TB','PF','MQ' ) AND A.DBXREL = 'Y'
Since there seems to be a lot of extraneous stuff in syspstat, I’m thinking
of using its DDL as a template for a new view, and paring down the columns
I need and also adding the “source_type is not null” selection to it.

Thoughts?

- Dan

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.