I need to store users' Facebook IDs in a column in my DB.
The ID always consists of only digits, and can be as large as a number in excess of 500 million. Considering that I won't ever need to do any arithmetic, sorting or use relational operators on the values, what would be a better choice: BigInt
or varchar
?
The value will always be unique and never non-existent (null
)
The only operation I do is check for the existence of an ID in the database, i.e. the =
operator.
Best Answer
varchar adds overhead:
Saying that, what does the Facebook API describe the type as? Use the "native" one of course