Understand transactions in Ninox
Learn how Ninox executes read and write transactions.
Ninox runs database actions as transactions. A transaction groups one or more operations into a single execution step. In practice, this means Ninox handles reading data and changing data in different ways.
Read transactions
A read transaction looks up data without changing it.
Typical examples are:
filtering records in a table
running a query to find matching records
reading values to display them in the app
When Ninox starts a read transaction, it works with the data state that was current at that moment. Changes saved by other users during that same query are not part of that result.
Ninox can process many read transactions at the same time. One user reading data does not usually block another user from reading data.
Write transactions
A write transaction changes data.
Typical examples are:
creating a record
editing a field value
deleting a record
clicking a button that updates data
running logic that writes values back to the database
Only one write transaction runs at a time. Other write transactions wait until the current one finishes. This is usually not a problem because most write transactions finish very quickly.
Use your knowledge of transactions to design a high-performance app
Good Ninox logic does more than return the right result. It should also run predictably, avoid blocking other users, and stay easy to maintain.
If Ninox seems slow or briefly unresponsive, a longer write transaction may be blocking the queue.
This happens when one action takes much longer than usual, and later write actions must wait. Common causes are:
calls to external services, for example with
http(...)large data evaluations combined with
selectcomplex logic inside buttons or automations that updates many records
Avoid these causes by keeping the write logic focused and short.
Follow these rules of thumb:
read and prepare data first when possible
keep API calls out of critical write flows when possible
avoid repeated
selectqueries inside loopstest buttons and automations with realistic data volumes
split large updates into smaller steps when possible
A practical way to think about it:
Use read transactions to inspect data.
Use write transactions only when you need to save a change.
The less work a write transaction has to do, the smoother the app feels for everyone.
Last updated
Was this helpful?