Filtering in query or filter with language functions?

I want to grab data with room and then filter that data with list functions of kotlin class.
I can also do that with pure SQL query but I like to do it with kotlin. I want to know which of these two methods is faster and better?

>Solution :

Filtering data with SQL is the best way and the fastest way also, specially when you have a big database you will notice the difference, also filtering with SQL will help you reducing RAM usage.

But again you will only notice the difference when you are working with big database, but in a small app you could use the method that you want.

Leave a Reply