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:
CREATE INDEX table1_idx_name_isdeleted ON Table1 (Name,IsDeleted);
CREATE INDEX table2_idx_deviceid_table1id ON Table2 (DeviceId,Table1Id);
SELECT
Table1.Id,
Table1.Name,
Table2.DeviceId
FROM
Table1
LEFT OUTER JOIN
Table2
ON Table1.Id = Table2.Table1Id
AND Table2.DeviceId = 4
WHERE
Table1.Name = 'xxxxxx'
AND Table1.IsDeleted = 0