MySQL Historical Data Query very slow
WHERE  BaseCurrency = 'EUR'
  AND  QuoteCurrency = 'USD'
ORDER BY  RateTime DESC


Needs

INDEX(BaseCurrency, QuoteCurrency, RateTime)


and

WHERE  CurrencyFrom = 'EUR'
  AND  CurrencyTo = 'USD'
  AND  ExchangeTime &lt;  '2018-01-29 12:00:00'
ORDER BY  ExchangeTime DESC


needs 

INDEX(CurrencyFrom, CurrencyTo, ExchangeTime)


Ditto for the third.

More discussion of how I came up with those indexes is in my Cookbook .

The reason for the sudden slowdown is buried in the size of the table, the value of innodb_buffer_pool_size, the number of rows that your too-short index touched, etc.

My indexes will be fast, regardless of any of those issues (for those queries).