September 17, 20187 yr If we use UUID's for all our key fields can we remove all the relations from the foreign key mapping section ? If so, would it result in a smaller script and a slightly better performance ?
September 17, 20187 yr The script would not be any smaller, and the performance would not be any better. There is no possible upside of removing the FK's, although if you didn't have the FK's configured to start with, it might not cause problems to skip that step. With that said, even with UUID's, it's still preferable to configure foreign keys. MirrorSync uses that to determine the order of tables and fields to sync. Inserts and updates are done on parent tables before their children tables. For deletions, the order is reversed - children first, then parents (to avoid triggering cascading deletes, which are relatively slow). Within a table, foreign keys are synced before other field types - if they were synced after other field types, lookup values and auto-enter calcs might have their custom values overridden with default values. In conclusion, while foreign keys are less critical for UUIDs than serial numbers, there are still important reasons to configure them, and there is no upside to not configuring them.
September 17, 20187 yr Author Thanks a lot for the detailed answer. I will check my relations instead of removing them then .
Create an account or sign in to comment