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 chargeitems_idx_workitem_id ON dbo.ChargeItems (WorkItem_Id);
CREATE INDEX workitems_idx_dmc ON WorkItems (DMC);
SELECT
[Limit1].[Id] AS [Id],
[Limit1].[DMC] AS [DMC],
[Limit1].[FirstSeen] AS [FirstSeen],
[Limit1].[DrawingNo] AS [DrawingNo],
[Limit1].[MachineId] AS [MachineId],
[Limit1].[WorkItemState_Id] AS [WorkItemState_Id],
[Limit1].[ItemType_Id] AS [ItemType_Id],
[Limit1].[Repaired] AS [Repaired],
[Limit1].[MachineCycle] AS [MachineCycle],
[Limit1].[FirstSeenCheck] AS [FirstSeenCheck],
[Limit1].[LastSeen] AS [LastSeen],
[Limit1].[Archive] AS [Archive],
[Limit1].[CastingDateString] AS [CastingDateString],
[Limit1].[Deleted] AS [Deleted],
[Limit1].[DMC2] AS [DMC2],
[Limit1].[Id1] AS [Id1],
[Limit1].[WorkPlace_Id] AS [WorkPlace_Id],
[Limit1].[CastingFormIdent_Id] AS [CastingFormIdent_Id],
[Limit1].[FormIdentItemType_Id] AS [FormIdentItemType_Id]
FROM
(SELECT
TOP (1) [Extent1].[Id] AS [Id],
[Extent1].[DMC] AS [DMC],
[Extent1].[FirstSeen] AS [FirstSeen],
[Extent1].[DrawingNo] AS [DrawingNo],
[Extent1].[MachineId] AS [MachineId],
[Extent1].[WorkItemState_Id] AS [WorkItemState_Id],
[Extent1].[ItemType_Id] AS [ItemType_Id],
[Extent1].[Repaired] AS [Repaired],
[Extent1].[MachineCycle] AS [MachineCycle],
[Extent1].[FirstSeenCheck] AS [FirstSeenCheck],
[Extent1].[LastSeen] AS [LastSeen],
[Extent1].[Archive] AS [Archive],
[Extent1].[CastingDateString] AS [CastingDateString],
[Extent1].[Deleted] AS [Deleted],
[Extent1].[DMC2] AS [DMC2],
[Extent1].[WorkPlace_Id] AS [WorkPlace_Id],
[Extent1].[CastingFormIdent_Id] AS [CastingFormIdent_Id],
[Extent1].[FormIdentItemType_Id] AS [FormIdentItemType_Id],
[Extent2].[Id] AS [Id1]
FROM
WorkItems AS [Extent1]
LEFT OUTER JOIN
[dbo].[ChargeItems] AS [Extent2]
ON [Extent1].[Id] = [Extent2].[WorkItem_Id]
WHERE
(
[Extent1].[DMC] = ''
)
OR (
(
[Extent1].[DMC] IS NULL
)
)) AS [Limit1]