Skip to content

Comment on SQLite Foreign Key Support (arriving in 3.6.19)parent

Comments

I haven't personally seen any cases where foreign keys improve performance; their benefit is the fact that relationships between tables are correct. However, I have seen times where foreign keys have seriously degraded the performance of some queries. If you are doing a lot of inserts into a table with many foreign keys, all of those constraints have to be checked on every insert.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.