MySQL primary key column type for large tables
When you create a column as BIGINT(44)
the "44" is the display width - it does not affect the range of values you can store or the speed at which they are retrieved.
For an auto-incrementing ID you want to use an UNSIGNED
number, e.g. BIGINT(44) UNSIGNED
. This will double the range of values and add an extra constraint, which is usually a good thing.
An unsigned INT will store up to:
4,294,967,295
An unsigned BIGINT will store up to:
18,446,744,073,709,551,615
you're not going to fill that any time soon.
You don't say how fast your maximum ID is growing - if you're not inserting many rows then you should stick with UNSIGNED INT
as it takes less space.