MYSQL查询语句:
SELECT t_ID,t_date_last,t_content,sub_ID,sub_name,u_name,u_pic FROM t1,sub2,user3 WHERE t_type = 't' AND t_status = '0' AND t_sid = sub_ID AND u_ID = t_user ORDER BY t_date_last DESC LIMIT 30
从三个表里读取数据,t1表共 100768 行32.5 MB,sub2表共 1055 行939.1 KB,user3表共 10696 行1.2 MB
查询花费 1.8137 秒 其中 Copying To Tmp Table 1.7 s
尝试了tmp_table_size=209715200 无效
t_type t_status t_sid sub_ID u_ID t_user t_date_last 全部索引。。。
主机是Linode 1024
求解~~~
SELECT t_ID,t_date_last,t_content,sub_ID,sub_name,u_name,u_pic FROM t1,sub2,user3 WHERE t_type = 't' AND t_status = '0' AND t_sid = sub_ID AND u_ID = t_user ORDER BY t_date_last DESC LIMIT 30
从三个表里读取数据,t1表共 100768 行32.5 MB,sub2表共 1055 行939.1 KB,user3表共 10696 行1.2 MB
查询花费 1.8137 秒 其中 Copying To Tmp Table 1.7 s
尝试了tmp_table_size=209715200 无效
t_type t_status t_sid sub_ID u_ID t_user t_date_last 全部索引。。。
主机是Linode 1024
求解~~~