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 1mYCuM-0003d2-Kf for pgsql-performance@arkaria.postgresql.org; Wed, 06 Oct 2021 19:48:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYCuL-0007Jt-9L for pgsql-performance@arkaria.postgresql.org; Wed, 06 Oct 2021 19:48:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYCuK-0007Fz-LV for pgsql-performance@lists.postgresql.org; Wed, 06 Oct 2021 19:48:53 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mYCuG-0000Xi-N3 for pgsql-performance@lists.postgresql.org; Wed, 06 Oct 2021 19:48:51 +0000 Received: by mail-wr1-x42c.google.com with SMTP id t2so12089909wrb.8 for ; Wed, 06 Oct 2021 12:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=/H6fBQQxnAxTNzczeSJJ0XSjXsfPuSJaBB6Xk8uDOj4=; b=2qfanTSgNZrJxj2Sjm7f7SWYCYdJWVMYy8Nn9oFACfj4z160aK8he+gR10W5gC2uP3 Cnc2qyVz2Mr1PHCl2UGdBJQeTBksYY+rkVTTFQG+ZodUPVoXs6poBFtePJfJ74MmewU9 V0NF4rOv+Kn679vlP7tHZeAR9J+OYDpc5pFYaycDDc7W4T7eFD303EHGUiUYL5Vhesor zlpTOL7sJSQIc3BDTgn1BjQ3aBhC00pVsAq8Bq8zn011XKmrdHSEkXmiZ9sYK1Noev+h 977k5L1B7crAv4g3tL2jdg3EDPD/7oUnagnKcdsWEuH7PaSAkIS82NiJ6zyVP1ldnZTj wl9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=/H6fBQQxnAxTNzczeSJJ0XSjXsfPuSJaBB6Xk8uDOj4=; b=10tawF3Hxq7AC6Mrom/kvnEdayHQkgr6bepePUcdmEw93mjtQdFynl0DA7lQUQLLba 0f9bcCKbHKwKDclNaOchmlv4g30cHeRtD8DRfNxHUZU0ap+0lVOOGycS1413NRM9gZP4 n2qvZN0UCjWkEjv4r+Fu3SuxoBPH3+Sc+jh5pXkPNyHr3Urpj58B6jv1zMOn3/jReMVD jCzJsigJcMc49d1kvJp7KOvun64gDzgBwxlOoVD7JW8piLOr8Zaq4cXQNhrb4kxsWMD8 rPW9HNRE0EZkeJhHhgdiXtZOqDluim2wDziaJgtVQ1qrVmSffynWlQwMga7fUqT7ez2y RwkQ== X-Gm-Message-State: AOAM53206BHDxEW+YyejUUvJ24NyDiJC5mfp66tjlqiuJKFGdZ25MjYz qEN4DON/TDIK9u7FXBeWjsXsgGZQfVDW30Se X-Google-Smtp-Source: ABdhPJx5LikEm4JVLI3dkutFFTOhEjwXHhs3c416RLpZhMbU/rONa/q+abIRCaX0SVa1sBrgv3yZyQ== X-Received: by 2002:a1c:791a:: with SMTP id l26mr201042wme.22.1633549726746; Wed, 06 Oct 2021 12:48:46 -0700 (PDT) Received: from localhost.localdomain (91-115-150-32.adsl.highway.telekom.at. [91.115.150.32]) by smtp.gmail.com with ESMTPSA id y1sm11174748wrh.89.2021.10.06.12.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 12:48:46 -0700 (PDT) Message-ID: Subject: Re: Troubleshooting a long running delete statement From: Laurenz Albe To: "Dirschel, Steve" , "pgsql-performance@lists.postgresql.org" Date: Wed, 06 Oct 2021 21:48:45 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2021-10-06 at 18:00 +0000, Dirschel, Steve wrote: > Are there other statistics in Postgres I may have looked at to methodically come to the conclusion that the problem was the missing index on the parent FK column? You could use the query from my article to find the missing indexes: https://www.cybertec-postgresql.com/en/index-your-foreign-key/ Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com