Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
When using MySQL (actually, Aurora), will inserting into a table with a foreign key constraint be slower than the same table without the constraint?
INSERT (etc) must check that there are no FOREIGN KEY violations. Hence it is slower. Think of it as checking to see if an entry is in an index.
Required, but never shown
3 years, 3 months ago
2 years, 2 months ago