getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
718 stars 1.38k forks source link

Optimize more entity filter expressions #6498

Open seadowg opened 1 week ago

seadowg commented 1 week ago

We want more filter expressions on entity lists to be faster and not require the full list in memory. We've currently made these optimizations for = ("eq") expressions that compare values to the entity ID (name) or an entity property. We want to expand this so that the following predicates on entity items have the same performance characteristics:

seadowg commented 1 week ago

@lognaturel are there other expressions you think we should target here? Also, are any of the ones I've included seem like they're not as important?

lognaturel commented 1 week ago

That seems like a good list and it feels priority ordered from top to bottom. Maybe < and > are the same priority as !=

Relatedly, we've also talked about analyzing the form to identify columns that should be indexed. That could be a separate issue or part of this work.