I'm working on a new application which stores it's data in a PostgreSQL database. The kind of data amongst other stuff is meter records from some measuring devices. There can be hundreds and thousands of those devices per customer and all normally provide few records per day. Newer records replace older ones by simply deleting the older ones and get inserted as new records with new ids. What my company doesn't know is how many customers with how many measuring devices and records per day we will really need to store.
As this is a new application, I would like to ask for your advice regarding using serial
vs. bigserial
as the ID for the meter records. Is there any noticable performance downgrade on current x64 CPUs or such? Storage for the ID field should increase by a factor of 2, right? Any obvious reasons why not to use bigserial
?
Thanks!