Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    35

    Unanswered: Basic Index Question

    Doing some research on the Internet, I still can't get my head around Clustered/Non-Clustered Indexes and which I should go with for my table.

    Table
    [UserID] int
    [ApplicationID] int
    [ModifiedBy] varchar(100)
    [ModifiedDate] datetime

    My ASP.Net applications will call a Stored Procedure that accepts UserID and ApplicationID and just does a basic SELECT statement where values match in the table. ModifiedBy and ModifiedDate are inconsequential and will never be used, it is there just for tracking issues. One thing to note, you either have 1 record or no records as the UserID and ApplicationID Combination is unique.

    Which index type should I go with and if you don't mind, just a small reason why.

    Below is what the table would look like:
    1,1,"maikeru-sama","1/2/2009"
    1,2,"maikeru-sama","1/2/2009"
    1,3,"maikeru-sama","1/2/2009"
    2,1,"maikeru-sama","1/2/2009"
    2,4,"maikeru-sama","1/2/2009"

    Server = MS SQL Server 2005

    Thanks

  2. #2
    Join Date
    Jan 2009
    Posts
    35
    I put a Clustered Index on the table for the time being.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Sounds like the reasonable thing to do.
    You should probably have the fill factor around maybe 95% and defrag the index every so often too.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •