DB-12 - Pick An Index, Any Index… Michael Lonski Allegro Consultants, LTD.
Whats Next… Prepare
Who I Am… Started working with Progress® v3 (1986) Founded Allegro Consultants in 1993 Internationally recognized speaker Author of Coding Smart book on ADM2 Punster and Frequent Talker
…And Why I Am Here Overview index rules Practical tools, not bookish theory Focus on fact, not guesswork Compile time information Run-time information Show off skill at alliteration
Whats Next… Prepare Predict
Hierarchy For A Single Index 1. Unique index with all components involved in the equality matches 2. Most active equality matches 3. Most active range matches 4. Most active sort matches 5. First index alphabetically by index name 6. The primary index
Multiple Index Usage If indexes are available for both sides of WHERE... AND/OR, more than one index can be used Multiple indexes will *only* be used to assist in bracketing records
WHERE…AND… WHERE clause includes the use of AND All components of each index are involved in equality matches No unique indexes are involved
WHERE…OR… WHERE clause includes the use of OR Both the left and right side of the OR contain at least the lead component of an index These lead components are involved in either equality or range matches
Whats Next… Prepare Predict Prevent
Breaking The Rules FIND … WHERE ROWID ( ) = … USE-INDEX …
Breaking The Index WHERE Family.CoveredOnBenefits WHERE … MATCHES … WHERE NOT … WHERE IF … THEN … = vcInput ELSE TRUE WHERE SUBSTRING (…) = A
Whats Next… Prepare Predict Prevent Plan
XREF Information COMPILE prog.p XREF prog.xref FIND FOR EACH
Demo – XREF-demo.p
XREF Information COMPILE prog.p XREF prog.xref DEFINE Query CREATE Query
Demo – Query-demo.p
Whats Next… Prepare Predict Prevent Plan Prove
If A Query Could Talk… qryCust Did I error? Did I bracket? What did I use?
How To Ask qryCust DEFINE QUERY qCust QUERY qCust: DEFINE VARIABLE vhQryCust AS HANDLE CREATE QUERY vhQryCust vhQryCust = QUERY qCust:HANDLE
What to Ask qryCust Did I error? Did I bracket? What did I use? vhQry:INDEX-INFORMATION() ERROR-STATUS:NUM-MESSAGES ENTRY(1, vhQry:I-I) = WHOLE- INDEX
Demo – wQueryTest.w
Whats Next… Prepare Predict Prevent Plan Prove Process
OpenEdge® 10 – Log Manager New features in OpenEdge 10 Both command-line and run-time controls Highly configurable
Log Manager Controls Command Line -clientlog -logentrytypes -logginglevel -numlogfiles -logthreshold LOG-MANAGER :LOGFILE-NAME :LOG-ENTRY-TYPES :LOGGING-LEVEL :NUM-LOG-FILES :LOG-THRESHOLD
Demo – Logging-demo.p
Now that Ive rambled on, are there any questions?
Thanks for attending…