数据格式:
{
"date": 1484219926,
"uid": "1234567",
"interest": [
"2000001",
"2000002",
".... 200050"
],
"other": "xxxx"
}
想得到一定时间内某个interest的总个数,如下sql
select count(*) from xxxxx where date>time1 and date<time2 and interest="20000xxx"
如何构建索引或者如何存放interest,能让这个查询更快, interest的长度dag大概500多个
{
"date": 1484219926,
"uid": "1234567",
"interest": [
"2000001",
"2000002",
".... 200050"
],
"other": "xxxx"
}
想得到一定时间内某个interest的总个数,如下sql
select count(*) from xxxxx where date>time1 and date<time2 and interest="20000xxx"
如何构建索引或者如何存放interest,能让这个查询更快, interest的长度dag大概500多个
1 个回复
wangx
赞同来自: