Elasticsearch Intermittent slow query


(Wang Jnercy) #1

Online environment Documents: 394.9k Data: 242.9 MB of elasticsearch-version:5.4.0
There will be a few full queries every hour, and the following is a slow query
took[615.1ms], took_millis[615], types[driverAsso], stats[], search_type[QUERY_THEN_FETCH], total_shards[5], source[{"size":0,"query":{"term":{"_id":{"value":"97230938609757053:97230938609757073","boost":1.0}}}}],



Please help to analyze the reasons. Thank you


(Thiago Souza) #2

If you have X-Pack installed then you can use Kibana's Search Profile to better understand the timings of your query. You can access it by going into Kibana Dev Tools.

But I can already tell you that with such small index there is no need to use 5 shards. Try using 1 shard and see if it gets better (there is an added overhead with multiple shards that might not be paying off)


(Wang Jnercy) #3

The cluster configuration of our production environment will continue to have intermittent slow queries


(Thiago Souza) #4

As I said before, the best way to start debugging performance issue with queries is using the Profiler in Kibana's Dev Tool


(Wang Jnercy) #5


I used constant_socre when debugging and found that build_scorer consumed a lot of time. What's the problem, thank you


(system) #6

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