> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# What does RBAR mean?
- URL: https://nolongerset.com/under-100-rbar/
- Published: 2022-11-03T19:24:31.000Z
- Updated: 2026-05-08T12:53:46.000Z
- Description: The concept of RBAR explained in under 100 words. #Under100
- Author: Mike Wolfe
- Tags: Under 100, #Import 2026-05-20 02:59

---

RBAR (pronounced REE-bar): **Row By Agonizing Row**

---

Databases are highly optimized to perform *set-based* operations. 

For example, if you want to get the total amount owed on your open invoices, it will be much faster to do that in a query (*a set-based operation*) than by looping (*row-by-agonizing-row)*.

## GOOD: Set-Based Operations

```sql
SELECT Sum(AmtOwed) As TotalOwed
FROM Invoice
WHERE PaidOn Is Null
```

## BAD: Row By Agonizing Row

```vba
Dim TotalOwed As Currency
With CurrentDb.OpenRecordset("Invoice")
    Do Until .EOF
        If IsNull(!PaidOn) Then TotalOwed = !AmtOwed + TotalOwed
        .MoveNext
    Loop
End With
```

---

### Further reading

[RBAR vs. Set based programming for SQLHaving read this link on RBAR and this, my understanding of RBAR amounts to this: Anything that have loops and cursorsAnything that’s not set based I know this sounds kinda wholly which is why I...![](https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a)Stack Overflowsuper9![](https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon@2.png?v=73d79a89bded)](https://stackoverflow.com/q/1687512/154439)

*Image by [Paul Keiffer](https://pixabay.com/users/daisymupp-15781409/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=5949104) from [Pixabay](https://pixabay.com//?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=5949104)*