All Ideas

Idea Details

Post an Idea
6,800  Points
In Development
Under active development by Salesforce. No commitment or firm timelines on delivery.

Count the SOQL count() query as a single row query

Apex

It would be nice to be able to make SOQL count() calls in triggers. Right now, a count() query ... Integer value = [Select count() from Contact where ..... ]; ...can easily exceed the governor limit of 1000 in triggers, making the function useless to us. If the Apex governor were to count the call as a single query, or as some finite number of queries (e.g. 100) we could deploy code and count on it working every time.

Merge Idea · Flag

Latest Comment from Salesforce

  • Chris Peterson - 1 month ago

    The Apex team is taking a fresh look at any possible performance and system load impacts making this change would cause. Depending on how that goes I hope to have further updates soon.
  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.