Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
就性能而言,级联参照操作的开销非常高,因为它们会导致更新每个事务的多个表。例如,如果从 Employees 到 Departments 都使用 ON UPDATE CASCADE 定义了外键,那么,在更新部门 ID 时,Employees 表就会自动更新。虽然级联参照动作很方便,但有时在应用程序逻辑中实现它们可能会更有效。请参见确保数据完整性。