select * from b_common_product_param where cname = ‘Type‘ order by ename limit 100000, 10;
select * from b_common_product_param INNER JOIN
(select id from b_common_product_param where cname = ‘Type‘ order by ename limit 100000, 10) as x using (id);
#第一条Sql查询时间:49.612
#第二条Sql查询时间:22.545
表数据:12740129
用于表连接时给定连接条件(可以理解为简写形式),如
SELECT * FROM table1 JOIN table2 ON table1.id = table2.id
使用 USING 可以写为:
SELECT * FROM table1 JOIN table2 USING(id)
原文地址:http://4925054.blog.51cto.com/4915054/1787519