Elasticsearch Intermittent slow query

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

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)

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

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


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

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