I have a situation where I want to ‘archive’ the current values of a table full of counters.
Is it wise to have something like:
create table stat_archive ( stat_id int, saved timestamp current_timestamp, count int, primary key (stat_id, saved));
Or is it better to just have a typical ‘id int’ field? The only reason I came up with this is because innodb clusters by pk, so perhaps this would be faster for table scans? My current archive table already has well over 1mm rows and I’m expecting it to increase by 10^2.
I’m just curious… thanks for any feedback.