delete last 9 h

  • I have  this query                    DELETE r FROM PBRecord r WITH (ROWLOCK)             WHERE r.pbRecordId = @MinId  OPTION (RECOMPILE);               it last 9 h !!. on powerfull server SQL server 2016 SP2 ,128 GB RAM

    attached execution plan

    please help  me to reduce the time!

    Thanks.,

    Regards,

     

    Hadrian

  • no plan attached

    blocking (open trans) can cause the query run even longer

     

  • Create an index keyed on pbRecordId on that table.

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

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

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