Colleagues,
I’m working on performance. It feels like a literal game of chess, which is probably why I’m so passionate about AppSheet.
To the point: while thinking of ways to improve sync performance, I began to reflect on what the Ref column is really for—what benefit does it provide?
The Ref column automatically creates a virtual field in the parent table called [Related_Children]. This virtual column is recalculated during every sync. This isn’t a big deal in small apps with security filters—but what happens when the number of records explodes, and on top of that, many tables have tons of these cross-references?
Personally, I don’t use system-generated views because if I change the app structure or regenerate columns, those views “reset,” which forces me to redo them. So I usually duplicate them and work on my own views, which remain unchanged. Along those lines, I also don’t use “inline” views. Normally, I keep the “Related” fields hidden (I still use them when needed, but many times they’re there and I never touch them).
If I mark a Ref field as Is a part of, I create a deeper dependency that enables cascading deletions (i.e. deleting a parent deletes all its children)—but that doesn’t apply to updates (updating a parent doesn’t update its children). Since those updates don’t cascade, there are two paths: either build a virtual column or create the logic using bots—which I find more appropriate.
At this point I thought: if I need a bot to update all child records, I could just as well use that same logic for deletions. It may be a bit more complex (just a little), but it could lead to 100% optimized sync performance.
Let me know your thoughts—maybe I’m overlooking something important that could make all the difference.