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!





  • 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) A socialist is someone who will give you the shirt off *someone else's* back.

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

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