Salesforce is multi tenant, so it enforces per transaction limits that stop one org's code hogging shared resources. The ones developers hit most are 100 SOQL queries and 150 DML statements per synchronous transaction, 50,000 rows retrieved by queries, 10,000 rows processed by DML, ten seconds of CPU time synchronously, and heap size. A limit exception cannot be caught, so the whole transaction rolls back.
Why interviewers ask this
Governor limits shape almost every design decision on the platform, so this is a baseline check for any Salesforce developer. The interviewer wants the multi tenant reason behind them, the common limits with roughly correct numbers, and an understanding that they apply per transaction and cannot be caught. Knowing that asynchronous contexts get higher limits, and checking consumption with the Limits class, shows practical experience.
How to structure your answer
- Explain why limits exist on a multi tenant platform.
- Name the limits you hit most, with rough values.
- Explain transaction scope and why the exception cannot be caught.
- Describe how you design and test with limits in mind.
Example answer
Salesforce runs many customers on shared infrastructure, so it puts hard limits on what one transaction can consume. The ones I actually run into are SOQL queries, a hundred per synchronous transaction, and DML statements, a hundred and fifty. Then rows: fifty thousand retrieved by queries and ten thousand processed by DML. CPU time is ten seconds for synchronous code, and heap size catches people holding big collections. The key detail is that limits apply to the whole transaction, not to my class, so my trigger shares its budget with every flow, trigger and managed package that runs on the same save. A limit exception cannot be caught, so everything rolls back. Asynchronous Apex gets higher limits, such as two hundred queries and sixty seconds of CPU, which is often the right home for heavy work. Day to day I bulkify everything, check the Limits class in debug logs when tuning, and test with two hundred records, because code that works for one record and fails for two hundred is the most common limit bug there is.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- Why does a limit exception roll back work done by other automation in the transaction?
- How would you check limit consumption while debugging?
- When would you move work to asynchronous Apex to get higher limits?
Related salesforce developer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions