How to reduce the queries in repeating panel

I have created repeating panels and it works. However, I could see it reloading all panels whenever a new value is selected. Is it possible to reduce this to only 1 panel or 1 query rather than firing N queries (where N is number of selected values)?

Moreover, from another question on including standard deviation, it was suggested to use a new panel that calculates the standard deviation in db. It is working as expected. However, when I use a repeating row with 2 panels (one for timeseries and one for standard deviation), then it is firing 2N queries. So, this is severly affecting my database performance.

I would be curious if using library panels or, my favorite little trick, the built-in special dashboard datasource would reduce calls to the backend. But I suppose it also depends on how you’ve templated things. It sounds like you’ve templated something, yes?