Defining the index size

If the maximum index size is set to 50000 and the growth percentage per index is set to zero, M3 SWB allocates enough memory for 5000 indexes even if the real size of the index is 2000.

If you define the growth percentage per index at 50 and the actual index size is 2000, M3 SWB allocates memory for 3000 indexes (2000 + (2000 * 50 / 100)).

You must use this method to define the index size if the size is stable.
Note: If the index size varies, then set the Growth Percentage per Index to zero. By doing this, the system uses the maximum index size as default.
Three types of indexes are defined in the example below. They are:
  • Index 1. The index is accessed through item and order number.
  • Index 3. The index is accessed through the shop order number. Only records with shop order number that are filled in are included in the index.Index 2. The index is accessed through the peg ID, peg suffix, item number and order number.

Refer to the field ID to understand special characters, such as the dollar sign that is used in the index definition.

How to Define Index 1 (selective index):

Index 2. The index is accessed through the peg ID, peg suffix, item number and order
		 
					  
					 INDEX1:   $113-25/~8 
					  
					              | | |  | 
					  
					              | | |  `- INTEGER* 4 offset 8 (Order No.) 
					  
					              | | | 
					  
					              | | `- Length 25 characters 
					  
					              | | 
					  
					              | `- Delimiter identifies length part 25
						(Length of Item number) 
					  
					              | 
					  
					              `- Character offset 113 (Item number) 
					  
					  
					  
					 CRITERIA: $5,O 
					  
					             |   | 
					  
					             |   `- O Record must contain this character 
					  
					             | 
					  
					             `- Criteria position. 
					  
					  
					 
		

A record must contain the letter O in the 5th character position to be included in the index.

How to Define Index 3  (compound index):


		 
					  
					 INDEX3:   $163-10 
					  
					              | | | 
					  
					              | | `- Length 10 characters 
					  
					              | | 
					  
					              | `- Delimiter identifies length part 10
						(Length of shop order no.) 
					  
					              | 
					  
					              `- Character offset 163 (shop order no.) 
					  
					  
					  
					 Selection part (must be fulfilled) 
					  
					 CRITERIA1:$5,O 
					  
					             |   | 
					  
					             |   `- O Record must contain this character 
					  
					             | 
					  
					             `- Criteria position. 
					  
					  
					  
					 Compound part (must NOT be fulfilled) 
					  
					 CRITERIA2: $163-10,   
					  
					               | | |         | 
					  
					               | | |         `- Record must not contain this
						value 
					  
					               | | | 
					  
					               | | `- Length 10 characters 
					  
					               | | 
					  
					               | `- Delimiter identifies length part 10
						(Length of shop order no.) 
					  
					               | 
					  
					               `- Character offset 163 (shop order no.) 
					  
					  
					  

Only the records that fulfill CRITERIA1 and not CRITERIA2 are included in the index.