Loading
Scalability
ApexGuru Antipattern: SOQL Without a WHERE Clause or LIMIT Statement

ApexGuru Antipattern: SOQL Without a WHERE Clause or LIMIT Statement

Executing SOQL queries without a WHERE clause or LIMIT statement can retrieve too many records, leading to governor-limit breaches for the number of rows returned. To restrict the amount of data returned, include a WHERE clause or LIMIT statement in SOQL queries.

Scope

Detection only

Detection Example

apex
  [SELECT Id, Name FROM Account];
 
正在載入
Salesforce Help | Article