I have a table with 3 columns:
int UserIDdatetime WorkDatestring 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.
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.