I have a number of tables that all use the same security filter: [club] = USERSETTINGS(“Club”). My largest table is an MYSQL table with about 250 entries. Whenever I apply the security filter to this table, the emulator times out while trying to sync. I don’t understand why this simple filter would require so much processing time. In mysql, an equivalent query returns in milliseconds.
As a test, I tried eliminating the usersetting function call, changing the formula to [club] = “DYC” . This eliminated the issue, suggesting that the usersettings() function has a great deal of overhead. Replacing the formula used to create the usersetting value with hardcoded values did not make any difference, so it doesn’t seem to be updating the value of the usersetting for each row. It appears that the problem is particular to calling usersettings() function or the [_THISUSER].[club] equivalent, and the problem also seems particular to a security filter since the same formula in a slice works fine.
For now, using a slice is my workaround. However, I am trying to make this app multi-tenant, so I’d prefer to use a security filter.
Any thoughts on what’s going on here & why a simple filter should be causing the app to crash?