|
本帖最后由 阿呆 于 2013-4-3 10:25 编辑
select * from goods where goodsid in(select goodsid from goodsatt where cid in(33, 101, 182, 188, 265, 377,402,498)) limit 31600,10;
耗时:1.7s
请问这个查询如何优化, 才能在0.0几s
create table goods(
goodsid int(8) not null primary key auto_increment,
title char(50) not null,
description text
);
create table goodsatt(
goodsid int(8) not null,
cid int(4) not null
);
|
|