Refresh query on tab change

Thank you Alex as well for your answer! As I stated before, the data is less than 10kb and the query execution time is less than 50ms. I forgot to mention that this time was measured on the client side (client statistics in sql management studio -> total execution time). This info might be of help to this request: Slow Retool apps Wanted!

(ps: I use SQL azure in West Europe and I connect from the Netherlands, which may explain why the query finishes so quick on my end)