• aleksandar.ivanovski (10/7/2013)


    Thank you all for the answers.

    I did created indexes on all FK fileds and run the following query:

    Select (s-thing from 5-6 tables)

    from Table_Containing_FK A

    Left outer join B

    on A.id1 = B.id

    Left outer join C

    on A.id2 = C.id

    Left outer join D

    on A.id3 = D.id

    Left outer join E

    on A.id4 = E.id

    where sthing

    DTA gives me the following instructions:

    CREATE NONCLUSTERED INDEX [_dta_index_XYZ] ON [dbo].[Table_Containing_FK]

    (

    [Status] ASC,

    [A1] ASC,

    [A2] ASC,

    [A3] ASC,

    [A4] ASC,

    )

    INCLUDE ([Code])

    Does this makes sense to you?

    Thank you,

    Aleksandar

    Sure it does. The reason is the index puts all of the keys together in a way it is best utilized for the search.

    Kurt

    Kurt W. Zimmerman
    SR DBA
    Lefrak Organization
    New York, NY

    http://www.linkedin.com/in/kurtwzimmerman