Avoid Non Restrictive Queries

< 1 min read

Impact Area

Performance

Severity

Medium

Affected Element

Apex Class

Rule ID #

SF-AVOID-NON-RESTRICTIVE-QUERIES

Impact #

Unfiltered queries can retrieve excessive data, potentially causing governor limit exceptions and negatively impacting application stability.

Remediation #

Apply appropriate filters to SOQL or SOSL queries to limit the amount of data retrieved.

Time to fix

30 min

Updated on March 21, 2025
Table of contents
Was it helpful ?