Using search terms effectively
The key to creating an effective search is to take advantage of the index. Splunk's index is effectively a huge word index, sliced by time. The single most important factor for the performance of your searches is how many events are pulled from disk. The following few key points should be committed to memory:
Search terms are case insensitive: Searches for
error
,Error
,ERROR
, andErRoR
are all the same thing.Search terms are additive: Given the search item
mary error
, only events that contain both words will be found. There are Boolean and grouping operators to change this behavior; we will discuss these later.Only the time frame specified is queried: This may seem obvious, but it's a big difference from a database, which would always have a single index across all events in a table. Since each index is sliced into new buckets over time, only the buckets that contain events for the time frame in question need to be queried.
Search terms are words, not parts...