Add indexing to speed up time series lookup