• You're taking out locks on both queueitem and handrule. It could be that the differences in order between those locks and the ones needed by the index rebuild could be the issue. And I realize that handrule is only a shared lock.

    Also, using table locking hints is pretty severe in terms of blocking off access to the system. Are you sure you need that level of locking?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning