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 `table` ADD INDEX `table_idx_plant` (`plant`);
SELECT
table.material
FROM
table
WHERE
table.plant = 10 INTERSECT SELECT
table.material
FROM
table
WHERE
table.plant = 20 INTERSECT SELECT
table.material
FROM
table
WHERE
table.plant = 30 INTERSECT SELECT
table.material
FROM
table
WHERE
table.plant = 40