What does the data architect need to change to make this query more performant?

The data architect for UC has written a SOQL query that will return all records from the Task object that do not have a value in the WhatId field:

Select id, description, Subject from Task where WhatId != NULL

When the data architect usages the query to select values for a process a time out error occurs.

What does the data architect need to change to make this query more performant?
A . Remove description from the requested field set.
B . Change query to SOS
C . ??
D . Add limit 100 to the query.
E . Change the where clause to filter by a deterministic defined value.

Answer: D

Subscribe
Notify of
guest
1 Comment
Inline Feedbacks
View all comments
TS
TS
2 years ago

Correct Answer is E . Change the where clause to filter by a deterministic defined value.