Can foreign keys hurt query performance

前端 未结 11 1803
温柔的废话
温柔的废话 2021-02-02 10:55

As I understood from this post, there are some scenarios where foreign keys can improve query performance.

I\'ve heard the opposite claim though, that because of refere

11条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 11:18

    If foreign keys had any impact in that way, it would be on INSERTS. The database does the referential checking on foreign keys when records are created/modified, not SELECTed.

提交回复
热议问题