Delay Database Calls

I’m currently trying to display info to googlemaps chart for every Mexico State. I’m trying to constraint and filter data in every state as shown.

thing is, the map loads after 6 - 7 seconds and doing some debugging i found out the issue is that constraint, if i remove that constraint data loads instantly. Is there any more efficient way to do it?



Fixed, i changed the way DB is structured to a new column for every state.