The answer, sadly, is NO.
The limit applies across all ApexPages.StandardSetController
objects created in the transaction
Proof
OrderItem with 4000 assets - create 2 SSC (8000 rows)
for (Integer i = 0; i < 2; i++) {
ApexPages.StandardSetController ssc =
new ApexPages.StandardSetController(
Database.getQueryLocator(
[SELECT Id FROM Asset WHERE OrderItem__c = '802630000012JJG']));
}
RESULT: Success
OrderItem with 4000 Assets - create 3 SSC (12000 rows)
for (Integer i = 0; i < 3; i++) {
ApexPages.StandardSetController ssc =
new ApexPages.StandardSetController(
Database.getQueryLocator(
[SELECT Id FROM Asset WHERE OrderItem__c = '802630000012JJG']));
}
RESULT: System.LimitException: Too many query locator rows: 10001
Why might this be a problem for you?
Imagine you have a VF page that displays multiple pageable lists, each represented by a StandardSetController
instance.
- List1 has 2,500 rows
- List2 has 3,000 rows (cumulative 5,500)
- List3 has 5,000 rows (cumulative 10,500)
No list will display and the controller will blow up with an uncatchable limits exception. Assuming you are locked into this design, you'll have to count the rows first for each list, and, if over 10,000, decide how to adjust the SOQL Limit n
value for the lists (like, do you favor the first list over the next? or is some list more business-useful?)