Can u tell me why when i want to create a foreign key....i have to create an index for the attribute?
Announcement
Collapse
No announcement yet.
foreign keys?
Collapse
X
-
It's a performance issue.
An indexed field can be searched much faster on. The fields of a primary key - foreign key relationship should both be indexed, because the joining will then be a lott quicker. The indexpages then maintain a 'key' to the datapages that need to be used to find the corresponding rows, so looking up the fields from the joined records, will be much faster.Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
Comment