Q:

How to improve R Shiny dashboard slowed by sql queries and big data processing

I am building a shiny dashboard for the Company I work for that displays key metrics for the Company. The dashboard currently loads quite fast, but as time goes by the dashboard is getting slower, since the tables in the database that I am querying (I am using RMySQL for this) are getting larger (it's collecting more data over time). 
I have done my best to make the SQL queries run fast (making use of index columns, repartitioning etc.), but that only takes it so far. After querying the data, the dashboard then needs to process that data, which is also slowing down over time due to the size of the data increasing.
Are there any options out there to work around this? An engineer I work with suggested using Ajax functions in R, that would allow the dashboard to load only a subset of data at first, (ie. last 2 months) enough to populate the dashboard's charts, and in the background would continue to load the rest of the data (on a separate process? I'm not sure). However, I don't know how to get started here. (what libraries to use, how to call the query and run the subsequent data processing code in an ajax function, etc.)
Any thoughts on this would be highly appreciated.
(Side Note: My queries would take long enough that it would cause the shiny dashboard to 'Disconnect from Server' when I tried to launch it from an AWS EC2 instance. I got around this by calling the queries within 'reactivePoll' function which I am sure is probably not the best way to do this.)
Edit 1: The dashboard also grabs some data from an API endpoint as well, and I'm not sure how this could impact the use of any ajax-like operations or functions to improve my dashboard.

A:

One option would be to use the fst package and store the sql data in fst file format. The front-end application would then proceed to extract the data from the fst file as oppose to hitting the sql server.

