Added missing index on time column to improve performance, closes #925