Fix #1969: Improve performance of daily statistics (DB key change)