# using timestamp as a part of pk \[innodb\]

**URL:** <https://forums.percona.com/t/using-timestamp-as-a-part-of-pk-innodb/692>\
**Category:** Other MySQL® Questions\
**Created:** [March 28, 2008, 11:34pm UTC](https://forums.percona.com/t/using-timestamp-as-a-part-of-pk-innodb/692 "2008-03-28T23:34:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed07](https://avatars.discourse-cdn.com/v4/letter/e/e68b1a/32.png) [@ed07](https://forums.percona.com/u/ed07)\
**Post date:** [March 28, 2008, 11:34pm UTC](https://forums.percona.com/t/using-timestamp-as-a-part-of-pk-innodb/692/1 "2008-03-28T23:34:13Z")

</div>

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.
