atalay
atalay4d ago

Advanced Message Filtering

It actually optimizes, because when it sorts its queries, it takes the pagination integer value and brings the values ​​on page x, for example, it can show values ​​between 5, 50 and 60, which means that instead of 1 million records, it only pulls 10 and performs pagination
1 Reply
makisuo
makisuo4d ago
That's not how it works sadly. It's not about what database rows I return it's about the filtering needing to happen in the database. When filtering for a column without an index, it will need to scan the entire Table to see what values to return, hence why convex really wants you to use indexes since they basically help the database to filter for this sepcific column waaay faster. Now when having multiple values you want to filter for you can create a shared index which is great! But makes it impossible to order the table by just one column since the index is shared by all column included. So the issue is, using none indexed filters would be way to unperofmant, but using a shared index is not an option since i need the data to be sorted

Did you find this page helpful?