Hi Vineeth,
Did you consider, using the OQL Module?
By using OQL, you can make your filtration process many times faster and efficient,
Let me know, if you have any issues,
Hope it helps!
Rishabh
(Resilient It Services)
One idea is to use Indexes
https://docs.mendix.com/refguide/indexes/#1-introduction
We have an application that needs to search fast as well, and we ended up having to denormalize the data so that there were no joins. We had fields with jsonified lists of objects stored in a string, and then used a java action to cast the list of json objects back into a string and query them.
To cast the list of json objects into a string, we used this query, "left join json_array_elements(CAST(attribute as json)) attribute on true"