• ALTER INDEX is a DDL operation, therefore it will be making changes to the system tables, hence needing locks on the rows in the underlying metadata. Without seeing the deadlock graph, that's about all I can guess.

    A select will always be chosen the victim in a deadlock by default, as it has done no work that needs to be rolled back.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass