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) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

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

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