几亿条数据,做match all查询,按照时间和id排序,使用From Size方式查询秒回,使用Search after方式查询,耗时十几二十秒,通过profile查看,时间耗在了next_doc: "searches":[
{
"query":[
{
"type":"BoostQuery",
"description":"(ConstantScore(DocValuesFieldExistsQuery [field=__time__]))^0.0",
"time_in_nanos":45722536283,
"breakdown":{
"set_min_competitive_score_count":0,
"match_count":0,
"shallow_advance_count":0,
"set_min_competitive_score":0,
"next_doc":45722241414,
"match":0,
"next_doc_count":410919487,
"score_count":0,
"compute_max_score_count":0,
{
"query":[
{
"type":"BoostQuery",
"description":"(ConstantScore(DocValuesFieldExistsQuery [field=__time__]))^0.0",
"time_in_nanos":45722536283,
"breakdown":{
"set_min_competitive_score_count":0,
"match_count":0,
"shallow_advance_count":0,
"set_min_competitive_score":0,
"next_doc":45722241414,
"match":0,
"next_doc_count":410919487,
"score_count":0,
"compute_max_score_count":0,
4 个回复
yuechen323 - 晨儿哥
赞同来自: MarvinLiu
MarvinLiu
赞同来自:
MarvinLiu
赞同来自:
@yuechen323 感谢
wanghaiyu1997 - 95后
赞同来自: