Developing Apama Applications > Developing Apama Applications in EPL > Testing and Tuning EPL > Best practices for writing EPL > Wildcard fields that are not relevant
Wildcard fields that are not relevant
Once a design has stabilized and event interfaces are well defined, it is possible to wildcard fields that do not need to be matched on in event listeners. Designating an event field as a wildcard prevents the correlator from creating an index for that field. Most importantly, a wildcard field means that the correlator does not need to traverse that index when receiving an event of that type to try to find interested event listeners (as there will not be any). This can give tangible performance benefits, particularly with large events.
Premature wildcarding is not advised but is not harmful. You can easily remove the wildcard annotation from event fields with no impact on existing code. The compiler gives an error if any code attempts to match on a field that is a wildcard.
The correlator can index up to 32 fields for each event type. If you are using an event that has more than 32 fields, you must designate the additional fields as wildcards.
See Improving performance by ignoring some fields in matching events.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.