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 7488001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:42:42+00:00 2026-05-29T14:42:42+00:00

I have a table with 3 columns: int UserID datetime WorkDate string WorkDetail Each

  • 0

I have a table with 3 columns:

  • int UserID
  • datetime WorkDate
  • string WorkDetail

Each user will have one WorkDetail per WorkDate. I’m using L2S and my where clause matches the UserID and the WorkDate like this:

where t.UserID == TheUserID && t.WorkDate.Date == TheDate.Date

Should I keep the order of the where parameter as is? Should I index the date or the userID?

Thanks.

  • 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-29T14:42:44+00:00Added an answer on May 29, 2026 at 2:42 pm

    If each users should have only one WorkDate then make that the primary key in the database. It will enforce data integrity and provide an index in one go.

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

Sidebar

Related Questions

I'm using SQL-Server 2005 Standard. I have Users table with following columns: userID(int), userImage(varchar),
I have a table [Users] with the following columns: INT SmallDateTime Bit Bit [UserId],
I have a table called tblRentalRates with the following columns: rate_id (int) rate_startdate (datetime)
I have a table with three columns: user varchar, status varchar , rep int
i have a database that already has a users table COLUMNS: userID - int
I have a table called Table with columns: ID (int, primary key, clustered, unique
I have a table having 2 columns EmployeeId (int) and EmployeeDetails(XMl type) EmployeeId EmployeeDetails
I have a table that has 5 columns: AcctId (int), Address1 (varchar), Address2 (varchar),
Say I have an MSSQL table with two columns: an int ID column that's
I have a table in SQL Server 2005 which has three columns: id (int),

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.