A few extra tidbits…
No pagination or partial loading but AppSheet does provide a mechanism for scaling large apps. You might want to check out Approaches to data scalability
The most important thing for efficient databases is data structure. You want the data to be as condensed as possible which usually means a good structure with table relationships. For example, if you have a large table where half of the rows have half of the columns blank, downloading still needs to download those blank columns. It is a very good sign you can split that table to condense it.
- Only download the data THAT user needs. Limiting the downloaded data makes the BIGGEST impact on Sync times and app performance!!
For instance, if you have a field worker who mainly submits data, they typically do not need to see history of entries. Create a “field app” that tailors the Security Filter to them - maybe only downloads the last week of entries.
An office person may be reviewing data and preparing it for payroll or monthly reporting. Create an “office app” that filter the data to, say, 6 weeks.
-
Use the Performance Profile - especially when building - to keep performance good. Review Virtual Columns which are the biggest culprit (see 3 below).
-
Avoid Virtual Columns that use Table Select expressions BUT do not change often. Instead use a table column with an App Formula and MANUALLY control, with actions, when that column updates. This sometimes means you need “update” actions placed in several places around the app and does complicate implementation a little but keeps performance good.
Not all expressions in a Security Filter will automatically translate to an SQL SELECT statement to download data. When they do not, AppSheet will split the Security Filter into 2 parts…one that filters as much on the database side as possible and then a second filter pass is made in the AppSheet servers. You can sometimes adjust your app so the Security Filter is more performant. The more that can be done on the database side the faster the download will be.
Get familiar with how to find and read the SELECT statements used by AppSheet to query the database. You can analyze that against the app Security Filter and make app adjustments to push more of the Security Filter criteria into the database SELECT query.
In BigQuery, as an example, an IN() function is not represented in the SELECT statement at all. An IN() function is just a series of OR conditions. If the source list in the IN() function is short, converting it into a set of OR’s might be worth the time saved in the database query.
An example of this, I had a work item that several people might be involved with and wanted that work item to show ONLY for those who are working in it. I collected all the people from all the child tables into a single list named “Worked By” and then used an IN() function in the Security Filter. This did NOT make it to the database query but filtered A LOT of rows.
I changed the “Worked By” list into a series of columns = “Worked By 1”, “Worked By 2” and “Worked By 3”. Then changed the Security Filter to a series of OR’s. This change was part of the database side query and made a huge difference in the download Sync time.
I hope this helps!