SELECT d.did,d.title
FROM xd_merchant_doc d,xd_merchant_catid c
WHERE
1 AND
d.company_areaid IN (311,2824,2825,2826,2827,2828,2829,2830,2831) AND
c.catid IN(3845,3856,3857,3858,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3869,3870,3871,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3886,3887,3888,3889,3890)
ORDER BY d.did
LIMIT 1, 10
—————————- 12s
SELECT distinct(d.did),d.title
FROM xd_merchant_doc d,xd_merchant_catid c
WHERE
d.company_areaid IN (311,2824,2825,2826,2827,2828,2829,2830,2831) AND
c.catid IN(3845,3856,3857,3858,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3869,3870,3871,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3886,3887,3888,3889,3890)
LIMIT 1, 10
———- 0.98
SELECT distinct(d.did),d.title
FROM xd_merchant_doc d,xd_merchant_catid c
WHERE
d.company_areaid IN (311,2824,2825,2826,2827,2828,2829,2830,2831) AND
c.catid IN(3845,3856,3857,3858,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3869,3870,3871,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3886,3887,3888,3889,3890)
LIMIT 1, 10
———————-给 company_areaid 加索引 0.023