mysql单数据库实例可以分库分表提供查询效率吗

2025-03-25 22:30:12
推荐回答(1个)
回答1:

可以分表

你把实际情况贴出来下,不一定分表能更快,可以考虑其他方法

举个例子 select * from T1 where `creattime` > '2015-01-01 00:00:00'
百万级表
效率远远低于
select * fromr T1 where `id` > (select `id` from T1 where `creattime` > '2015-01-01 00:00:00' order by id desc limit 0,1);

先考虑查询效率优化语法,在考虑分表