Performance Issues Working with Anvil Data Tables and Row Iterators

I use as few tables as possible and put all the stuff that is not used for querying in a simple object column. Linked tables are often victim of the n+1 problem, simple object columns are often faster.

In some cases, when the simple object columns contain large amounts of data, even working with simple objects can be slow and just getting 50 of them can take 1 second.

So my apps usually use the Anvil query operators when working with one record and, sometimes, use SQL (I think only available on dedicated plans) when working with or aggregating many rows.

For example the forms that show a list of documents may use SQL to get the list and dig inside the simple object columns and add some statistics. Once the user picks a document, the forms that work on that document only use Anvil queries. Most of the apps that use SQL use only one SQL query.

2 Likes