Select just one field from the row instead of all of them (*
). Even though you're not using them, mysql still has to fetch them from storage and get them ready for transmission.
SELECT columnA FROM table WHERE ...
Otherwise there's not much else you can do to improve things, other than putting indexes on columnA and columnB to make the searching go faster.