Way to Optimize Navigation badges counts
I have a query that get the count of a model for each resource in Filament. It's taking to much time now since there is so much data. is there a good way to get it without using the cache?

Solution:Jump to solution
Ensure you've got your database indexes optimised, and count really shouldn't be taking any time at all.
You could use a persistent view within your database structure to store your counts...but really modern databases don't need these workarounds....
2 Replies
Solution
Ensure you've got your database indexes optimised, and count really shouldn't be taking any time at all.
You could use a persistent view within your database structure to store your counts...but really modern databases don't need these workarounds.
yeah the indexes optimization make it faster.
2.3s to 800ms
thanks