Web Analytics Made Easy -
StatCounter foreign keys? - CodingForum

Announcement

Collapse
No announcement yet.

foreign keys?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • foreign keys?

    Can u tell me why when i want to create a foreign key....i have to create an index for the attribute?

  • #2
    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

    Working...
    X