I'm trying to write a query that returns a moving average from a large table (>1M rows).
The table has a column with a date, and and an other column with a numeric value. I need the last 10 days, with the 10 day moving average for every date.
Whatever I tried turned out to be painfully slow (and run only with infinidb_vtable_mode = 0 or 2).
Is there a proper "infinidb way" to do fast moving average (or similar window-function) queries?
Thank you.