× 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.



I missed that 51-logical's part, ouch. Then again, you could have 51
logicals and one index, not that bad.

I've seen cases where index sharing was _possible_, but no one had done what
was needed to enable it. If you have 4 logicals, keyed:

A
A, B
A, B, C
A, B, C, D

And you created them in that order you'll have 4 indexes, but if you created
them in the reverse order you'll have one. _BIG_ performance difference. It
can be worth it to examine the logicals for index sharing possibilities too.

-Walden


------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
(208) 692-3308 eFax
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 
-----Original Message-----
From: Reeve [mailto:news@xxxxxxxxxx] 
Sent: Tuesday, February 17, 2004 5:51 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Efficient Code

SQL, and watch the optimizer results, and use the Operations Navigator to
analyze usage patterns.

I suggest examining the 51 logicals and get rid of the ones seldom used in
batch.  SQL or OPNQRYF might provide acceptable performance in selecting the
records you want.  Then go consider the likely ways a user would select/view
data, and make sure you have access paths built over those columns.  If you
STRDBG and run SQL or OPNQRFY, you'll see what access path was selected and
why; this can point you in the right direction.  

-rf   

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of Chris_Bougher@xxxxxxxxxxxxx
> Sent: Tuesday, February 17, 2004 3:54 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: Efficient Code
> 
> What would be the most efficient way to get records from a large file
where
> the user can enter selection criteria for as many as 16 fields. i.e.
> 
> Key1 is required
> Key2 is required
> Key3 is required
> 
> Field1 is optional
> Field2 is optional
> Field3 is optional
> Field4 is optional
> Field5 is optional
> Field6 is optional
> Field7 is optional
> Field8 is optional
> Field9 is optional
> Field10 is optional
> Field11 is optional
> Field12 is optional
> Field13 is optional
> 
> The file currently has over 9 million records and growing.
> 
> The file has a record length of almost 300 bytes.
> 
> The file currently has 51 logicals but none have the keys I need in the
> right sequence.
> 
> The screen requires that values be entered for the key values but the
> others may  or may not have values entered.
> 
> I am not sure if SQL would be the best or making a few logicals over the
> file with only the keys and checking the record against the entered data
> would be better.
> 
> Any opinions?
> 
> Thanks in Advance.
> Chris Bougher
> 
> 
> 
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.


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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.