mysql索引问题
我有两张表table1,table2,table2中有一个字段要和table1中的两个字段进行比较,语句是:
select a.* from table1 a, table2 b where a.start <= b.colum and a.end>=b.column;
不管是建 table1 表上的start,end 组合索引 还是start ,end的单个索引,或者是加上强制索引:
select a.* from table1 a force index(index_name), table2 b where a.start <= b.colum and a.end>=b.column;查询速度很慢...对索引知道的还比较少,都不会走table1的索引,各位达人有什么好的建议没?