Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYIFY-00014v-A1 for pgsql-performance@arkaria.postgresql.org; Thu, 07 Oct 2021 01:31:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYIFX-0000W1-4L for pgsql-performance@arkaria.postgresql.org; Thu, 07 Oct 2021 01:31:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYIFW-0000Vs-PJ for pgsql-performance@lists.postgresql.org; Thu, 07 Oct 2021 01:31:06 +0000 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mYIFS-0004sS-0X for pgsql-performance@lists.postgresql.org; Thu, 07 Oct 2021 01:31:06 +0000 Received: by mail-qv1-xf36.google.com with SMTP id a16so3201370qvm.2 for ; Wed, 06 Oct 2021 18:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=sGtqOVZef11D1/WliAy0CG2gUgZYsqFwjzGxHKdGb0g=; b=cyKyMVz/S1nd5xf1/oF5MhcTsjWv1yiJ32rHl0eK2IIgWHPnm5VTwkeCaKiHEzGpTr O8My2fjbpF9oNIlh5ByrRwQfMyCqpU0Erth73/9Yba6d3RIh/IJvmgNiwJI+Atbuu//B /MYBRzZ3qhX6DDrjK5YXsS5jGQan2PlF7EsMczhM+L9Mjrrxym0tHD8HzFOE9+CHuyNY mAzJaizCp98oKiIZS84BRoio9EuuplL1P2EB2ISZAx4sjN+INuPV49AYojMBWXb59R+r iWTtqlT2x204Wj6ohs2gIBGrDjPIpaww34JemR6O0PYaeegYXTfYRoHk4kQVz6sYSiIJ WF3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=sGtqOVZef11D1/WliAy0CG2gUgZYsqFwjzGxHKdGb0g=; b=LzAJb0rKIxdXZVzfQWCEVojRYBDO8AmXkaOvDTknDt2PwZ695LpwtWNCJDMsaX6J3H kXmdBPVV6IoAz0IY7KN5kFSeexfW4XNJzb54nG61KJ1lP0ANabcX7aV9osd6yuVU5m2M paPQS7YpBC94khXFR71k0v766pUeXOw5I20tDbRCwZCFSQfeAOOHvyj53Ctm54uzqBwZ ytoU6nwGKCZkehCsy8wbuyqv30fZPZ2BhKgH/mKSk+CcqpfoL1crBsZ23iSjLCNXXAWB lYIBTeqi2mtcQ0BDSnx9J1a/ipqJAKFPDjGk6bUBpLaZjf0D4vBHT2XnP5HOw5eypjvm Pyng== X-Gm-Message-State: AOAM532a87UdBYdInEEakA4YPbsPG5zb40Qzzw6UqcSnwiYxBni7hchd sWbrEj7TK/F7GhKVspcHqbQqpNgW8ETgKQ== X-Google-Smtp-Source: ABdhPJwloWGUyqTf+PpZnWDGJwYL9AjhKfy+pOJk1oEkaGKqZLVUZLGwNnB50/h7utFi6L/YTU/z4w== X-Received: by 2002:a0c:f30a:: with SMTP id j10mr1510973qvl.39.1633570259905; Wed, 06 Oct 2021 18:30:59 -0700 (PDT) Received: from [192.168.2.100] (pool-72-79-19-93.nwrknj.east.verizon.net. [72.79.19.93]) by smtp.gmail.com with ESMTPSA id m24sm12246613qki.40.2021.10.06.18.30.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 18:30:59 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------JhifQzkJm8TwjhujYAtKI7TO" Message-ID: <0ac28d5c-43f4-0766-cd65-d6b1583ef7fa@gmail.com> Date: Wed, 6 Oct 2021 21:30:59 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [EXT] Re: Troubleshooting a long running delete statement Content-Language: en-US To: pgsql-performance@lists.postgresql.org References: <20211006192000.GJ27491@telsasoft.com> From: Mladen Gogala In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------JhifQzkJm8TwjhujYAtKI7TO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/6/21 16:32, Dirschel, Steve wrote: > postgres=# explain (analyze) delete from t;  Delete on t I would try explain (analyze, timing, buffers). That would also give you the timing of each step so you can figure which one takes the longes. Regards -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com --------------JhifQzkJm8TwjhujYAtKI7TO Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 10/6/21 16:32, Dirschel, Steve wrote:
postgres=# explain (analyze) delete from t;  Delete on t 

I would try explain (analyze, timing, buffers). That would also give you the timing of each step so you can figure which one takes the longes.

Regards


-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
--------------JhifQzkJm8TwjhujYAtKI7TO--