Can index pattern regex affect visualization data acquisition speed?

I see lots of examples of index patterns for visualizations. Most of those patterns look like sometext*. However, I've been using a system in which most of the patterns are *sometext. What effect, if any, do these patterns have on how performant a visualization is? Can a pattern affect how quickly a chart acquires and renders its data?

Leading wildcard queries is one of the worst types of queries for Elasticsearch as it basically results in the equivalent of a full table scan, so would be considerably slower queries with a trailing wildcard.

1 Like

Thanks Christian. Just to confirm: leading wildcards are slow; trailing wildcards are better and faster. In your response, I should replace "slower queries WITH a trailing wildcard" with "slower queries THAN a trailing wildcard?

Leading wildcard queries are horribly slow and should be avoided at all costs. Training wildcard queries can still be slow. You may want to look into using ngrams instead of wildcards, as this typically is much faster while taking up more space on disk.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.