The database this is being queried against contains a few million records - just wondering if the following query can be optimized at all
SELECT Count(DISTINCT [t0].[gUserId]) AS [UserId]
FROM [Plan] AS [t0]
WHERE EXISTS(
SELECT NULL AS [EMPTY]
FROM [Entry] AS [t1]
WHERE ([t1].[PlanId] = ([t0].[id]))
AND ([t1].[EntryMobile] = 1) AND (NOT ([t0].[Deleted] = 1)))