Subject | Re: [firebird-support] do fields with foreign key need index |
---|---|
Author | Ann Harrison |
Post date | 2014-01-22T22:20:05Z |
On Wed, Jan 22, 2014 at 3:46 PM, <dixonepperson@...> wrote:
if table A has a primary key and table B has a field with a foreign key on A.primarydoes that field in table B also need an index or will it use the index for the primary key?Yes, there's a separate index on the referencing field in B, but you don't need to create it. Firebird creates it when you declare the foreign key relationship. Perhaps I didn't understand what you were saying, but Firebird indexes are specific to a single table - there's no way A's primary key index could be used to locate records in B.Good luck,Ann