Multiple group by performance DB

Hi!
Im using a search for group by to print data from DB in a HTML to make a js code run, although it has a terrible performance, the html doesnt run until 8s after page load (bubble side). Is there any other way to do it?, any advice?
Every search prints a number on the map, it sums every item on the db meeting certain conditions.
I need a way to count more efficiently, to have a better performance and a faster load of the map.

Thanks in regards!



On page load, fetch the data from the database and store it in the custom states. Then use custom states to do the calculations. It might reduces the time

1 Like

It might work, but the map should also change its values using date range inputs on real time, do you think it can be done too?

You can use API workflow to update the data

1 Like

How’s that? could you handle me any resource? thanks in advance.

i will try this

It works, thanks

Happy to help