原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/_tune_your_queries_with_the_profile_api.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/_tune_your_queries_with_the_profile_api.html
本地英文版地址: ../en/_tune_your_queries_with_the_profile_api.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Tune your queries with the Profile APIedit
You can also analyse how expensive each component of your queries and aggregations are using the Profile API. This might allow you to tune your queries to be less expensive, resulting in a positive performance result and reduced load. Also note that Profile API payloads can be easily visualised for better readability in the Search Profiler, which is a Kibana dev tools UI available in all X-Pack licenses, including the free X-Pack Basic license.
Some caveats to the Profile API are that:
- the Profile API as a debugging tool adds significant overhead to search execution and can also have a very verbose output
- given the added overhead, the resulting took times are not reliable indicators of actual took time, but can be used comparatively between clauses for relative timing differences
- the Profile API is best for exploring possible reasons behind the most costly clauses of a query but isn’t intended for accurately measuring absolute timings of each clause