SELECT * FROM img WHERE sitesid > 1100000 ORDER BY idimg ASC LIMIT 1 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE img range sitesid sitesid 4 4416971 Using where; Using filesort