Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6124657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:09:28+00:00 2026-05-23T16:09:28+00:00

Is there any need to add an index to a foreign key in SQL

  • 0

Is there any need to add an index to a foreign key in SQL Server 2008 or is this handled by default. In many of my tables I have one FK that points to the user account table and most selects are made with this WHERE Account_FK = id. So index could be a quick performance win here i hope.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:09:28+00:00Added an answer on May 23, 2026 at 4:09 pm

    As a rule, you want all your JOIN keys to have indexes on them, so yes add an index.

    If it’s a composite key make sure to put all the relevant fields in the index key list in an appropriate order.

    To my knowledge the only times an index is created automatically in SQL Server is when you add a primary key to a heap (non-indexed table) – the PK is assigned as the Clustered Index Key automatically; or, as Damien points out below, when you add a UNIQUE constraint to a field or set of fields.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any compatibility issues that would prevent this from working? Do I need
Is there any way to use server controls in ASP.NET MVC? Specifically I need
Is there any need for code with author's name added in every function or
Is there any way to show joptionpane in shutdownhook i.e I need to show
Is there any way to provide user log-in without the need for a DB.
Are there any VNC Libraries for Java, I need to build a JSP/Servlet based
I need to stop the execution Is there any procedures for using terminate and
Are there any good code profilers/analyzers for Erlang? I need something that can build
Are there any wizard type controls in WPF? I need functionality where I can
Are there any open source implementations of the Ribbon interface available? I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.