What does RBAR mean?

The concept of RBAR explained in under 100 words. #Under100

What does RBAR mean?

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

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

BAD: Row By Agonizing Row

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

Further reading

RBAR vs. Set based programming for SQL
Having 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...

Image by Paul Keiffer from Pixabay

All original code samples by Mike Wolfe are licensed under CC BY 4.0