In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
ALTER TABLE `tableCars` ADD INDEX `tablecars_idx_manid_val` (`Manid`,`val`);
ALTER TABLE `tableManufactures` ADD INDEX `tablemanufactures_idx_val` (`val`);
ALTER TABLE `tableTrucks` ADD INDEX `tabletrucks_idx_manid_val` (`Manid`,`val`);
ALTER TABLE `tableVans` ADD INDEX `tablevans_idx_manid_val` (`Manid`,`val`);
SELECT
tM.val,
(SELECT
min(t1.val) AS MakesCars
FROM
tableCars t1
WHERE
tM.id = t1.Manid LIMIT 1) AS MakesCars,
(SELECT
min(t2.val) AS MakesTrucks
FROM
tableTrucks t2
WHERE
tM.id = t2.Manid LIMIT 1) AS MakesTrucks,
(SELECT
min(t3.val) AS MakesVans
FROM
tableVans t3
WHERE
tM.id = t3.Manid LIMIT 1) AS MakesVans
FROM
tableManufactures tM
ORDER BY
tM.val