Grafana is slow when selecting variables and refreshing

HI guys, i am using variables to select year and month and putting in the query, it work but takes forever to refresh, even refreshing dashboard every 3 seconds, as I understand changing variables would refresh queries, but it takes even 5 minutes to show the dashboard upgraded, I am using a 16GB ram gamer PC, that is my query:

and those are my variables and Graph, hope anyone can help me

Even saving a Dashboard sometimes is a pain in the a…

It’s not grafana , it’s probably your queries that are slow. Or your queries return way too much data (like 10K datapoints per series) which can be slow to render.

Usually grafana dashboards load in milliseconds and refresh fast, but you if have super slow queries it will take a long time.

If you have very slow queries grafana will be slow as well (to save for example) as browser only allow a limited set or queries to same host so grafana has to wait for some queries to complete in order to send save command.

Open chrome dev tools network tab to get a fee for timing of network requests