---
title: "Discussion on \"SOQL Inside Loops: The Single Most Common Governor Limit Cause\" | Hashnode"
description: "Discussion on \"SOQL Inside Loops: The Single Most Common Governor Limit Cause\". Apex limits 100 SOQL queries per synchronous transaction. The 101st query throws and rolls back the whole operation. Almost every Salesforce org has at least one trigger that hits this. The refactor is mechanical and the test that catches i"
url: "https://hashnode.com/posts/soql-inside-loops-the-single-most-common-governor-limit-cause/6a127b6fddd318bf23bcfd31"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SOQL Inside Loops: The Single Most Common Governor Limit Cause](https://sapotacorpvn.hashnode.dev/soql-inside-loops-the-single-most-common-governor-limit-cause?utm_source=hashnode&utm_medium=feed)

Apex limits 100 SOQL queries per synchronous transaction. The 101st query throws and rolls back the whole operation. Almost every Salesforce org has at least one trigger that hits this. The refactor is mechanical and the test that catches i

May 24 · 6 min read · sapotacorpvn.hashnode.dev  
Read the article

-   [#salesforce](https://hashnode.com/tag/salesforce)
-   [#apex](https://hashnode.com/tag/apex)
-   [#soql](https://hashnode.com/tag/soql)
-   [#apex-development](https://hashnode.com/tag/apex-development)
-   [#governor-limits](https://hashnode.com/tag/governor-limits)

## Written by

[SapotaCorp](https://hashnode.com/@sapotacorpvn)

@sapotacorpvn · Hanoi, Vietnam

  
[View profile](https://hashnode.com/@sapotacorpvn)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
