Optimized to batch insert latest data. Skipping timestamp checks also.