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

  • SEARCH
  • Home
  • 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 8933491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:33:06+00:00 2026-06-15T09:33:06+00:00

I have a Login Table that has a Identity field Id as the Primary

  • 0

I have a Login Table that has a Identity field “Id” as the Primary Key(clustered) , and other fields like email , password etc.The only time I will use this table is to authenticate the user.After that i will be always querying other tables like user_profile, user_comments etc which has a foreign key Login_id to the Login Table.
My question is, is it a good idea to make the Login_id in the user_profile and user_comments table , a clustered index ? I will not be doing any join with the Login table since after the user is successfully authenticated, i will keep the LoginId in FormsAuthentication.SetAuthCookie for future querying the child tables.

I am developing a web app using C# and .Net.

Thanks in advance !

  • 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-06-15T09:33:08+00:00Added an answer on June 15, 2026 at 9:33 am

    Since you will be constantly using the Login_id to get data from user_profile and user_comments, and assuming these searching using login_id in those tables will be more often than any other columns like Id, in those tables, then “login_id” should be clustered indexed . Basically, you would want to use the clustered index on column that gets queried the most. It could be two columns like “first name” and last name. From MSDN

    It is important to define the clustered index key with as few columns
    as possible. If a large clustered index key is defined, any
    nonclustered indexes that are defined on the same table will be
    significantly larger because the nonclustered index entries contain
    the clustering key. The Index Tuning Wizard does not return an error
    when saving an SQL script to a disk with insufficient available space.

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

Sidebar

Related Questions

I have a table that has a user id & timestamp, like the following.
I have a favorite table containing some fields like login_id,driver_id(One login_id may have many
I've created a login page and in the db table i have a field
I have a CakePHP 1.3 application that has a login system, which works well.
I have an iPhone app that has several different view controllers. A login screen
I have a User class that has a UserProfile class. The email is stored
I have a gridview table that has three columns..fileID, uploadedBy and delete. Only the
I have a _layout page which has a login box (partial view) and that
I have a table called Users in my database. Let's assume that User has
i have two tables i am trying to get information from. login table -

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.