does delete statement lock the table

Posted on 2009-02-23
Last Modified: 2012-05-06
does delete statement lock the table and is there any way to speed up the delete process for large tables , other than creating indexes on the condition fields.
Question by:rohit_kapil
    1 Comment
    LVL 23

    Accepted Solution

    I believe (from memory) they create row locks but not table-level by default.  Is there referencial integrity with other tables?  Are you doing multiple or single commits?
    The general advice these days (10g and higher) is to rename the source table, then create a (new) original table by copying in the records you wish to keep.  The technique is commonly referred to as CREATE TABLE AS SELECT... (CTAS).  Other options are to disable unnecessary indexes and constraints.  Check also if you're firing triggers.
    Depending upon your ease of restarting, some suggest altering the table and indexes to nologging.
    Hope this helps!

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    If you have problems displaying reports in CRM after a new installation, review the following steps: Check that SQL Server Reporting Services is working On the server that has SQL Server Reporting Services (SQL SRS) installed, check that the S…
    Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now