What does RBAR mean?
The concept of RBAR explained in under 100 words. #Under100
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
.MoveNext
Loop
End With
Further reading
Image by Paul Keiffer from Pixabay