ForceChallenges
ProblemsDailyNotesInterview
Sign in

Practice

All problemsSOQL practiceApex trigger challengesDaily challengeOpportunityTrigger.oldMapBefore UpdateBulkificationContactValidationGROUP BYSemi-JoinAccountBefore Insert

Interview questions

All questionsAdminAdministrationApexApex TriggerAsync ApexDevelopmentField ServiceField ServiceIntegrationLwc

By company

DeloitteSalesforceAccentureInfosysPwCCognizant

Learn

Study notes

ForceChallenges

AboutContact usPrivacy PolicyTerms of ServiceFor AI assistants (llms.txt)
© 2026 ForceChallenges · Salesforce SOQL & Apex trigger practice
Service Cloud questions36 of 100
Service CloudMedium 2 min read

How do administrators manage high-volume case databases to prevent governor limit bottlenecks and slow queries?

Answer

Basics: Governor limits cap what one transaction may do (for example 50,000 rows returned by SOQL, 100 synchronous SOQL queries), but slowness on millions of cases is mostly about query selectivity, locking and sharing. This is called Large Data Volume (LDV) design.

How it works:

  • Indexes: standard indexed fields include Id, Name, OwnerId, CreatedDate, SystemModstamp, lookup and master-detail fields, RecordTypeId and External IDs. Support can create custom indexes.
  • Selectivity: a filter on a standard index is selective if it returns under roughly 30 percent of the first million records (and 15 percent beyond); for custom indexes about 10 percent and 5 percent, with caps. Verify exact current thresholds.
  • Use Query Plan in the Developer Console to check cost.
  • Archive closed legacy cases to Big Objects, an external store or a data platform; delete with Bulk API hard delete.
  • Skinny tables (via Support) speed reads on wide objects.

Advanced / deep dive: Non-selective queries in triggers on objects over 200,000 records throw errors. Avoid negative filters (!=, NOT IN), leading wildcards (LIKE '%x'), null checks and formulas on unindexed fields. Skew: more than about 10,000 cases owned by one user (ownership skew) or children under one parent (parent skew, for example one Account) causes row lock and sharing recalculation delays; spread ownership across queues or integration users. Use Bulk API 2.0 and PK chunking for exports. Defer sharing calculations during bulk loads. Move heavy aggregation to reports with filters, CRM Analytics or an external warehouse. Async SOQL is retired.

Code / config example:

sql
-- Selective: indexed date filter plus owner
SELECT Id, CaseNumber, Status FROM Case
WHERE CreatedDate = LAST_N_DAYS:30 AND OwnerId = :queueId
-- Avoid: SELECT Id FROM Case WHERE Status != 'Closed' (low selectivity, negation)

Hidden gotchas & must-remember points:

  • Governor limits are per transaction; LDV issues are mostly timeouts and locks.
  • Query timeouts occur around two minutes.
  • Formula fields and cross-object formulas cannot be indexed unless deterministic and requested.
  • Storage counts: most records use about 2 KB data storage.
  • Deleted records stay in the Recycle Bin for 15 days.
  • Archiving must keep reporting and compliance needs in mind.

Best practice: Design queries around indexed filters, archive by policy, and load-test with production-sized data.

Service CloudData ManagementGovernor Limits
Practice SOQL & Apex
PreviousHow do real-time voice transcriptions enhance agent guidance and automated knowledge suggestions during calls?Next How does Experience Cloud community integration achieve case deflection and promote customer self-service?

More Service Cloud questions

  • What role do asynchronous Apex and batch jobs play in handling heavy background processing for support operations?
  • What data governance practices ensure long-term database hygiene across enterprise Service Cloud environments?
  • How does entitlement process versioning manage rule updates for active customer support contracts?
  • How do real-time supervisor alerts assist contact center managers in mitigating queue bottlenecks?
  • How do Knowledge feedback analytics help authors identify articles that require content revision?