Eliminating the most frequently occurring record first is most efficient. For example:
Elimination of the Most Frequent Record
A occurs 2,000 times B occurs 1,000 times C occurs 50 times 017 COMPANY EQ 'A' DROP (Tests 3,050 records, drops 2,000) 017 COMPANY EQ 'B' DROP (Tests 1,050 records, drops 1,000) 017 COMPANY EQ 'C' DROP (Tests 50 records, drops 50) 4,150 tests required to drop all records. or
Eliminating records randomly is least efficient. For example:
Elimination of Random Records
A occurs 50 times B occurs 1,000 times C occurs 2,000 times 017 COMPANY EQ 'A' DROP (Tests 3,050 records, drops 50) 017 COMPANY EQ 'B' DROP (Tests 3,000 records, drops 1,000) 017 COMPANY EQ 'C' DROP (Tests 2,000 records, drops 2,000) 8,050 tests required to drop all records.
|
Copyright © 2014 CA.
All rights reserved.
|
|