目前的业务是每天的数据量有30w条,数据表按日区分,如果想对这所有的数据的进行筛选,应该使用哪些思路呢?
例如如下的表结构:
id | type | other1 | other2 |
---|---|---|---|
1 | 1 | other1 | other2 |
2 | 1 | other1 | other2 |
3 | 1 | other1 | other2 |
4 | 2 | other1 | other2 |
5 | 3 | other1 | other2 |
..... | ..... | ..... | ..... |
2999998 | 2 | other1 | other2 |
2999999 | 1 | other1 | other2 |
3000000 | 4 | other1 | other2 |
每天都有大量的数据,分别按日期存储在数据表内
talbe_data_10_11
talbe_data_10_12
talbe_data_10_13
如果现在想对type进行筛选并查询这三张表的所有数据,有哪些高效的办法呢?
我这里用mycat 实现分表