I had found a post that had some explanations as to which logic expressions were better on performance than other such as AND being better than an OR, etc. I’m fairly certain Praveen was the one explaining this. If anyone knows this post or can provide some advice on which expressions should be used over other similar expressions that would be appreciated. I have an app with some severe filters, virtual columns and conditions that were created while function was more necessary than speed and I am going to be spending some time going back and organizing those formulas.
Thanks!
I’m not aware of a performance benefit between AND() and OR(). In some other programming languages, these functions offer short-circuit evaluation, which can be a huge win, but AppSheet doesn’t do this. To achieve the benefits of short-circuit evaluation, you’d have to implement it yourself by replacing AND() and OR() with properly-constructed IF() or IFS().
SELECT() and its derivatives (FILTER(), LOOKUP(), MAXROW(), and MINROW()) are expensive.
Nested SELECT() (etc.) expressions are very expensive.
Chained virtual columns are less expensive than virtual columns with nested SELECT() (etc.).
If a virtual column value is entirely dependent on non-virtual column values of the same row, convert the virtual column to a normal column.
To maintain aggregate values (e.g., totals), consider using a normal column rather than a virtual column and adding an action and/or workflow to trigger the recalculation only when appropriate.
I remember that I was just looking randomly around the forum and found a post about performance. Thought to myself dang that’s pretty cool information, I want to look at that later, then forgetting to bookmark it…thanks for your advice! I don’t know that I have nested Select() in the literal sense but I do have Selects of virtual columns that use Selects.
[Improving performance by getting rid of unnecessary virtual columns](https://community.appsheet.com/t/improving-performance-by-getting-rid-of-unnecessary-virtual-columns/12152) Questions
Hey guys, I am trying to tweek out some performance by working through the details in the performance profile. I do not use many of the virtual columns created by appsheet automatically but if I delete them they are regenerated on save. Some of them take up a second or so performance time. Is there a way to disable them? Another question, is there a way to quickly identify the virtual columns that are not used in your app? Thanks Hyman
Found it!
I think I miss read Praveen’s third point here, I do admit I just skimmed this post.
Improving performance by getting rid of unnecessary virtual columns
In #2, If you have security filters, and they are simple (ANDs, equality or IN conditions) and you use a SQL database, then you count the rows that pass the security filters only … otherwise you count all rows