Can index pattern regex affect visualization data acquisition speed?

(John O'Conner) #1

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?

(Christian Dahlqvist) #2

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.

(John O'Conner) #3

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?

(Christian Dahlqvist) #4

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.

(system) #5

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