Skip to main content
Tweeted twitter.com/#!/StackSalesforce/status/565286224269938688
edited tags
Link
Uwe Heim
  • 28.5k
  • 20
  • 121
  • 287
Source Link
Jason Clark
  • 12.2k
  • 7
  • 64
  • 123

What does Limits.getAggregateQueries() represent?

Per the Limits class documentation, there are a pair of methods for "aggregate queries":

getAggregateQueries()

Returns the number of aggregate queries that have been processed with any SOQL query statement.

getLimitAggregateQueries()

Returns the total number of aggregate queries that can be processed with SOQL query statements.

To what limit do these methods refer? I have checked the Limits Guide, and I can't find any limits specific to aggregate queries. In my DE org, Limit.getLimitAggregateQueries() returns 300; I can find no relevant limit with a value of 300. I've used these methods in measuring code that runs SOQL aggregate queries (albeit dynamic queries, via Database.query()); Limit.getAggregateQueries() always returns 0, and the queries are always counted by Limit.getQueries(). Does this refer to some limit no longer in use? Is it documented elsewhere?