Hello! There is a table, about 700K lines (test), fighting about 10M lines. When searching by table (sample query):
SELECT `p`.*, (SELECT name FROM brands b WHERE b.id = p.brand_id) brand_name, (SELECT name FROM dealers d WHERE d.id = p.dealer_id) dealer_name FROM `parts` `p` WHERE (`p`.`part_number` LIKE "%123" OR `p`.`part_new` LIKE "%123" OR `p`.`part_old` LIKE "%123" OR `p`.`part_alt` LIKE "%123") ORDER BY `p`.`part_number` ASC LIMIT 100 The request takes about 56.0167 seconds, and sometimes 87.1817 seconds.
Types of fields:
part_number | varchar(100) | latin1_swedish_ci | NOT NULL part_new | varchar(100) | latin1_swedish_ci | NOT NULL part_old | varchar(100) | latin1_swedish_ci | NOT NULL part_alt | varchar(100) | latin1_swedish_ci | NOT NULL Tried to put the index, but it does not pick it up, picks up the other completely:
ALTER TABLE `parts` ADD UNIQUE `search_by_partnum_cols` (`part_number`, `part_new`, `part_old`, `part_alt`, `dealer_id`, `brand_id`) Please advise how to accelerate this request. With indices there is little experience and I cannot find an sensible article how to arrange them: to push everything from a request, or only a part, etc. ...

p.reverse_part_number LIKE '321%'. So exactly there is a probability of using the index on p.reverse_part_number, if it is built. - Sergey