It might sound like a simple question, but I’m currently facing challenges when querying an OrderedMap with around 50,000 entries.
Let’s assume the map uses an id as the key and a record as the value. This record contains fields such as userId, projectId, and others. I want to filter tasks based on one or more of these fields — either individually or in combination.
So my question is: What is the best strategy to implement such filtering without hitting the Wasm execution or complexity limits?
Yes, using a secondary index seems to be the right approach. However, the real challenge in my case is updating the index — this is where I consistently hit the Wasm complexity limit. How do you update the index or keep the index in sync in case of adding a new entry or updating an existing?