• I'd also create the best indexes while re-working the code.

    #Events indexes:

    1) Unique Clustered on ( ProcessDate, L4Ident ) --in that order

    2) Nonclustered on ( L4Ident )

    3) NNonclustered on ( LinkRL4, L4Ident ) Include ( ProcessDate ) --yes, processdate would be auto-included anyway, but I like to explicitly specify it anyway, in case the clus index changes later.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.