疲劳是最舒适的枕头,努力工作吧。

查询聚合分析很慢,用profile api分析各个阶段时间又比较快?我的时间耗费在哪里了?

Elasticsearch | 作者 alian | 发布于2020年04月15日 | 阅读数:3628

各位大佬,我有个查询聚合语句执行很慢。但是我用profile分析发现各个阶段的时间还是挺快的。但是总时间还是挺慢,需要6s左右。这时间是消耗在哪里了?大佬能给点方向吗?
1586930535446_C7535822-617F-4735-B73E-EAC3A0F32E09.png

查询语句:
GET /nmpa_cosmetic/_search
{
"track_total_hits": true,
"profile": "true",
"size": 0,
"query": {
"bool": {
"must": [
{
"nested": {
"query": {
"bool": {
"must": [
{
"term": {
"manufacturerJson.enterpriseName.keyword": {
"value": "科丝美诗(中国)化妆品有限公司",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"path": "manufacturerJson",
"ignore_unmapped": false,
"score_mode": "avg",
"boost": 1
}
},
{
"range": {
"launchDate": {
"from": 1388505600000,
"to": 1586707200000,
"include_lower": true,
"include_upper": false,
"format": "epoch_millis",
"boost": 1
}
}
},
{
"match_all": {
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"aggregations": {
"nestedjson": {
"nested": {
"path": "ingredientJson"
},
"aggregations": {
"nlist": {
"terms": {
"field": "ingredientJson.efficacyType",
"size": 10000,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"_count": "desc"
},
{
"_key": "asc"
}
]
}
}
}
}
}
}

 
已邀请:

要回复问题请先登录注册