International Toll Free Audio Numbers International Toll Free Audio Numbers Participant Dial-In Number(s): US Dial-In #: 1-877-833-5338 Int'l/Canada Dial-In #: 1-706-679-7033 Conference ID. Audio 31053400 Alternate 800 service by country CA IDMS TM /DB Indexing Part 2 Maintaining Indexes Bill Abbott Dick Weiland February 21, 2008 Legal This presentation was based on current information and resource allocations as of February 21, 2008 and is subject to change or withdrawal by CA at any time without notice. Notwithstanding anything in this presentation to the contrary, this presentation shall not serve to (i) affect the rights and/or obligations of CA or its licensees under any existing or future written license agreement or services agreement relating to any CA software product; or (ii) amend any product documentation or specifications for any CA software product. The development, release and timing of any features or functionality described in this presentation remain at CA s sole discretion. Notwithstanding anything in this presentation to the contrary, upon the general availability of any future CA product release referenced in this presentation, CA will make such release available (i) for sale to new licensees of such product; and (ii) to existing licensees of such product on a when and if-available basis as part of CA maintenance and support, and in the form of a regularly scheduled major product release. Such releases may be made available to current licensees of such product who are current subscribers to CA maintenance and support on a when and if-available basis. In the event of a conflict between the terms of this paragraph and any other information contained in this presentation, the terms of this paragraph shall govern. 3 February IDMS/DB Indexes Part 2; Maintaining Indexes 1 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
Poll: Please Identify Your Job Function > [Live Meeting Multiple Choice Poll. Use Live Meeting > Edit Slide Properties... to edit.] > Database Administrator > Application Developer >IT Manager >Consultant >Vendor >Other Abstract This session discusses common usage considerations when defining, loading, and maintaining indexes in a CA IDMS /DB Database environment. The session assumes a basic knowledge of the structure of an index and covers those items which a DBA must deal with to define and load an efficient index and to keep that index performing at a desired level. 5 February IDMS/DB Indexes Part 2; Maintaining Indexes Topics of Discussion >Introduction > Index Analysis/Definition > Index Performance 6 February IDMS/DB Indexes Part 2; Maintaining Indexes 2 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
Introduction > The successful usage of CA IDMS /DB indexes requires that users focus their efforts in two major areas Analysis/definition of each index Review/maintenance of existing indexes > These efforts should be repeated as index usage evolves 7 February IDMS/DB Indexes Part 2; Maintaining Indexes Index Analysis/Definition > Before any decisions can be made concerning the physical characteristics of an index, the manner in which the index will be used must be determined Growth vs. static Insertions vs. adding to an end of the index Deletions Hot spots System vs. user-owned 8 February IDMS/DB Indexes Part 2; Maintaining Indexes Index Analysis/Definition (cont d) > The database area in which an index resides must be determined > User-owned indexes must reside in the same area in which the index owner is stored > System-owned indexes have the flexibility to be assigned to an area on an index-by-index basis Always assign growth indexes to their own database area Each index should at least be assigned to its own page range through the use of area subpage ranges 9 February IDMS/DB Indexes Part 2; Maintaining Indexes 3 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
Index Analysis/Definition (cont'd) > Isolation of indexes into their own database areas allows for: Easier maintenance/recovery operations Better statistical analysis of the index structure Better results from tuning options 10 February IDMS/DB Indexes Part 2; Maintaining Indexes Index Analysis/Definition (cont'd) > The number of levels in the index and the index block count (IBC) must be determined > As a general rule, indexes should contain 3 to 5 levels > Fewer levels will generally reduce the number of SR8 records accessed by a binary search and will usually result in larger IBC values 11 February IDMS/DB Indexes Part 2; Maintaining Indexes Index Analysis/Definition (cont'd) > Larger IBC values mean more user record entries per SR8 record. In a high update index, this can increase the level of contention for level-0 SR8 record occurrences. This is especially true for indexes anticipated or found to contain hot spots. > A large part of the work done against some indexes just uses level-0 SR8 records and does not perform as many binary searches as anticipated 12 February IDMS/DB Indexes Part 2; Maintaining Indexes 4 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
Index Analysis/Definition (cont'd) > After the number of levels and the IBC value are chosen, the displacement of level-0 SR8 records is critical to efficient index processing System indexes User-owned indexes > Selection of the page size for an index area should insure that no full-sized SR8 record is greater than 30% of a page 13 February IDMS/DB Indexes Part 2; Maintaining Indexes Index Analysis/Definition (cont'd) > The method used to do the initial build of an index or subsequent rebuilds should consider the characteristics of the index > Static contents No additional considerations are usually needed > Growth anticipated or high number of adds and deletes 14 February IDMS/DB Indexes Part 2; Maintaining Indexes Index Analysis/Definition (cont'd) > Main processing at the ends of the index Most SR8 splits result in only the record being added going into the new SR8, so no special load procedures are typically needed > Random insertions Random insertions will cause immediate splits Build the index with a smaller than planned IBC and a page reserve specified for the area After the build/rebuild increase the IBC to the calculated maximum and remove the page reserve 15 February IDMS/DB Indexes Part 2; Maintaining Indexes 5 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
Index Performance > Assuming that an index was properly sized and built, poor performance within that index typically evolves over time > Indexes that have a high growth rate or whose insertions are primarily random are the indexes that should be periodically reviewed > System-owned indexes residing within their own area are the easiest to analyze 16 February IDMS/DB Indexes Part 2; Maintaining Indexes > Information to analyze an index s structure can come from a number of different utilities IDMSDBAN PRINT SPACE PRINT INDEX CA IDMS /DB Analyzer 17 February IDMS/DB Indexes Part 2; Maintaining Indexes >IDMSDBAN Reports on the number of levels in an index, SR8 record counts, and member record counts. The utility can be sensitive to missing index sets within the subschema. IDMSDBAN can take a long time to run. > PRINT SPACE Can be used to review space utilization of index areas to determine if the anticipated number of SR8 records per page is achieved. Runs reasonably quickly. 18 February IDMS/DB Indexes Part 2; Maintaining Indexes 6 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
>PRINT INDEX Prints the structure of the index in great detail Good for looking at indexes that may be corrupted and can be used to determine the level of orphans in the index Enhanced to include statistical reports for Release 17.0 Runs quickly but can generate large reports > CA IDMS /DB Analyzer CA product to analyze index structures Provides information on index levels, orphan counts, SR8 size, defined index characteristics, numerous averages, percentages, and comparative statistics 19 February IDMS/DB Indexes Part 2; Maintaining Indexes > Indexes that display high I/O activity during the storing of records or during random retrieval of records by their symbolic key may display an excessive number of index levels and SR8 records that are shorter than anticipated > This may be caused by any number of things: Improper page size selection for the selected IBC Inadequate level-0 page displacement Higher than anticipated member record count Hot spot record insertion 20 February IDMS/DB Indexes Part 2; Maintaining Indexes > Corrective action is to rebuild the index using the MAINTAIN INDEX utility after any required resizing FROM INDEX option uses RETURN verbs to access the index and can be the fastest option. It does require that the index is intact. FROM MEMBERS or ALLROWS options are always acceptable Processing user-owned indexes requires a user-written front-end program 21 February IDMS/DB Indexes Part 2; Maintaining Indexes 7 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
> Planned enhancements to the TUNE INDEX utility will allow it to be used to accomplish many of the functions that required MAINTAIN INDEX. Brings top level SR8 to its optimal location Optionally rebalances the index structure Optionally re-sequences the index structure Runs online or batch 22 February IDMS/DB Indexes Part 2; Maintaining Indexes > Indexes that display high I/O activity during ERASE, DISCONNECT, or commands that walk an index while the run-unit is readied in an UPDATE mode, might suffer from excessive orphan occurrences > This is a situation that is caused by high numbers of random insertions into an index and will typically require periodic maintenance operations against the index MAINTAIN INDEX TUNE INDEX CA IDMS /DB Audit User-written adoption program 23 February IDMS/DB Indexes Part 2; Maintaining Indexes > Corruption within an index may reveal itself through occurrences of abends with codes in the range of 1142 though 1158 (excluding 1148) > The specific corruption of the index can typically be identified using one of the following utilities: IDMSDBAN PRINT INDEX CA IDMS /DB Audit 24 February IDMS/DB Indexes Part 2; Maintaining Indexes 8 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
> Correction of the index will require programmatic intervention instead of simply patching chains CA IDMS /DB Audit Can repair problems involving the chains connecting the SR8 records MAINTAIN INDEX utility Rebuilding indexes using the FROM MEMBERS or FROM ALLROWS options will always correct the index structure 25 February IDMS/DB Indexes Part 2; Maintaining Indexes Session Summary >Introduction > Index Analysis/Definition > Index Performance 26 February IDMS/DB Indexes Part 2; Maintaining Indexes Poll: How Useful Was This Presentation > [Live Meeting Multiple Choice Poll. Use Live Meeting > Edit Slide Properties... to edit.] >Extremely Useful > Very Useful >Mildly Useful > Of no Value 9 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright
For More Information > ca.com/support CA IDMS home page CA IDMS recorded webcasts, roadmap, tech documents, > ca.com/betas > ca.com/idms > ca.com/caworld 28 February IDMS/DB Indexes Part 2; Maintaining Indexes Legal Certain information in this presentation may outline CA s general product direction. All information in this presentation is for your informational purposes only and may not be incorporated into any contract. CA assumes no responsibility for the accuracy or completeness of the information. To the extent permitted by applicable law, CA provides this document as is without warranty of any kind, including without limitation, any implied warranties or merchantability, fitness for a particular purpose, or non-infringement. In no event will CA be liable for any loss or damage, direct or indirect, from the use of this document, including, without limitation, lost profits, lost investment, business interruption, goodwill, or lost data, even if CA is expressly advised of the possibility of such damages. 29 February IDMS/DB Indexes Part 2; Maintaining Indexes Questions & Answers CA IDMS Indexing 10 February IDMS/DB Indexing, Part 2 of2; Maintaining Indexes Copyright