Enabling Primary Key Enforement in v7.2 - disposition of existing data
Reading through the New Features documentation I found the new option to enforce Primary Keys (finally!). I went out to the full documentation and read up on the scenarios for enforcement, but one i could not find. Does anyone know what happens if you have data in the table and then turn on enforcement? Meaning, does the existing Primary Key data in the table get validated to ensure that it is good (this is what many other dbms's do)? Or does it assume that it is good and only validate new data that comes in?
If it does not validate existing data when you turn it on, I would assume best practice be to enable it for a table, then immediately run 'analyze_constraints()' afterwards (?) Would we have any concerns if you turn it on, do not validate, and a report runs that encounters duplicates? - I ask this since there was a note that queries would run faster if the optimizer knew there was no duplicates.