Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailemVyřešeno SQL - Je cudzí kľúč rovnocenný bežnému indexu z hľadiska indexovania?

V prípade MySQL sa taký index automaticky vytvorí, pokiaľ neexistuje, viď dokumentácia:

MySQL requires indexes on foreign keys and referenced keys so that foreign key checks can be fast and not require a table scan. In the referencing table, there must be an index where the foreign key columns are listed as the first columns in the same order. Such an index is created on the referencing table automatically if it does not exist. This index might be silently dropped later, if you create another index that can be used to enforce the foreign key constraint. index_name, if given, is used as described previously.

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny