![]() ![]() This is required so that there is always a well-defined row to which the foreign key points. Consequently, the target side of a foreign key is automatically indexed. Such constraints are implemented with unique indexes in PostgreSQL. The referenced columns in the target table must have a primary key or unique constraint. In the following, I will call the table, on which the foreign key constraint is defined, the source table and the referenced table the target table. This article will explain that and show you how to search for missing indexes. Foreign key index performance © Laurenz Albe 2018įoreign key constraints are an important tool to keep your database consistent while also documenting relationships between tables.Ī fact that is often ignored is that foreign keys need proper indexing to perform well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |