I thought I would check out the impact of the larger key. I creted two tables, one with a smallint PK and the other using bigint.
CREATE TABLE `keytest_si` (
`id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `keytest_bi` (
`id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Then I looked for my largest table that would fit in a smallint. I then wrote the ids from this table to each of the two new tables.
mysql> select count(*) from production_status;
+----------+
| count(*) |
+----------+
| 60000 |
+----------+
1 row in set (0.01 sec)
mysql> insert into keytest_si (id) select id from production_status;
Query OK, 60000 rows affected (1.67 sec)
Records: 60000 Duplicates: 0 Warnings: 0
mysql> insert into keytest_bi (id) select id from production_status;
Query OK, 60000 rows affected (1.86 sec)
Records: 60000 Duplicates: 0 Warnings: 0
That's a difference of 0.2 seconds over 60,000 records. The added cost per record insert is therefore 0.000003 seconds. Do you really think that's worth the worry and the extra processing it's causing you? (Which probably takes far longer than the time saved)
And Merry Christmas to you too.