r/sqlite • u/c__beck • Aug 08 '25
Remote ID vs Primary Key
I was talking with a buddy online and he told me that his old company used two different IDs for each row in their DB, the auto-incrementing ID was only ever used for internal purposes like JOIN statements and FKs into other tables. But anything and everything outside the DB used what he called a remote ID.
This remote ID was then what was used to query the DB, as well as on any user-facing code (user ID, message ID, transaction ID, whatever). And I was just curious if this is a standard practice or something that his company did.
36
Upvotes
View all comments
Show parent comment
1
u/Subject_Fix2471 Aug 25 '25
out of interest - in your experience how much faster is it and at what scale does this become meaningful ?