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 `ChildTable` ADD INDEX `childtable_idx_typecolumn_parentid` (`TypeColumn`,`ParentID`);
ALTER TABLE `ParentTable` ADD INDEX `parenttable_idx_id` (`ID`);
SELECT
Parent.SomeColumn
FROM
ParentTable Parent
INNER JOIN
ChildTable Child1
ON Child1.ParentID = Parent.ID
INNER JOIN
ChildTable Child2
ON Child2.ParentID = Parent.ID
WHERE
Child1.TypeColumn = 'Type1'
AND Child2.TypeColumn = 'Type2'