I'm not sure what the inequality column means for the index

  • Jesse,

    I ran the SQL - I have one entry with a score of 119,567. It is displaying equality_columns of StrategyCode and HistoryDate on one table - no inequality columns - so I'd create an index on StrategyCode, HistoryDate?

    I have another table where the sole entry is under inequality_columns - RRCode - so I'd make an index on RRCode?

    I have a third table where I have TransactionAction, TransactionEntityType under equality_columns and ProcessStatusFlag under inequality_columns.

    Is this telling me to make 2 indexes - or 1 index of TransactionAction, TransactionEntityType and ProcessStatusFlag?

    TIA,

    Doug

  • Yes for the first two:

    StrategyCode, HistoryDate

    RRCode

    3rd:

    one index on TransactionAction, TrasactionEntityType,PrcessStatusFlag

    Don't neglect the includes

    The missing index views don't account for clustered index inheritance. Clustered index seek columns are appended to the end as seeks to every non-unique nonclustered index, and as includes to every unique nonclustered index.

    SQL Server will never seek any further keys on and index beyond the one it has to seek on an inequality operation. So put all the equalities first, and then the inequalities. Preferabbly find the one most-used (unless some other queries seek it as an equality) and relegate the rest to includes since they'll never get used.

  • Jesse,

    I lost the link to this topic - do you have the URL of your script?

    Thanx,

    Doug

  • http://www.sqlservercentral.com/scripts/Index+Management/63937/

    There seems to be one other topic that has the same problem also - What to do with Multiple Similar Index Reccommendations

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

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