Best practice for creating indexes

  • What are a few best practices for creating indexes on a table?

    For example, I have three tables.

    Table 1 (employee info)

    --------------

    Emp_ID - PK

    First_Name

    Last_Name

    Table 2 (school info)

    --------------

    id - PK

    Empl_ID - Foreign Key

    School_Type_ID - Foreign Key

    School_Name

    Degree_Received

    Table 3 (category info - includes school types and other types)

    --------------

    id - PK

    Type_ID - Foreign Key

    Type_Name

     


    Thanks,

    Edmond Shamon Larson

  • generally speaking, you should create indexes on FK columns, e.g. create an index on Emp_ID column in Table 2

  • Thank you. I'll do that.

    If there's any additional suggestions please feel free to post.


    Thanks,

    Edmond Shamon Larson

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply