MySQL中的聚合语句:
select sum(adv_price) from report_2019_01 where report_time>=1546272000 and report_time<1546358400;
MySQL聚合结果是:11612.840
将上面时间的数据全部导入es中,并聚合: "aggregations": {
"revenue": {
"sum": {
"field": "adv_price"
}
}
}
}
Elasticsearch聚合结果是:9064
select sum(adv_price) from report_2019_01 where report_time>=1546272000 and report_time<1546358400;
MySQL聚合结果是:11612.840
将上面时间的数据全部导入es中,并聚合: "aggregations": {
"revenue": {
"sum": {
"field": "adv_price"
}
}
}
}
Elasticsearch聚合结果是:9064
1 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: gxguetcw