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 1pFrIq-00005j-2D for pgsql-general@arkaria.postgresql.org; Thu, 12 Jan 2023 06:43: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 1pFrIo-00028D-PU for pgsql-general@arkaria.postgresql.org; Thu, 12 Jan 2023 06:43:06 +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 1pFrIo-000284-DA for pgsql-general@lists.postgresql.org; Thu, 12 Jan 2023 06:43:06 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFrIm-0005hL-6q for pgsql-general@lists.postgresql.org; Thu, 12 Jan 2023 06:43:05 +0000 Received: by mail-pj1-x102b.google.com with SMTP id z1-20020a17090a66c100b00226f05b9595so4689886pjl.0 for ; Wed, 11 Jan 2023 22:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/D465Hxu1CTGVT0YjeUGiheXxV054VpJdvrVAlM49Kg=; b=gNdrrURyFYrp0U6DDsjAeawszQRCzCex3FXS6moi9YeP4jDRLSTB8Onp9M6d9NbEkX O3fIV3lwT+jF+rDpoLx9sakMq7by7KTRxQ03d5yxAvsVnm0t+I7OMij+h7Y7/ogpUqrR uVUe2nEBYT4yjfsPV/j2xh+QFv5O95aj1OXncQ8+ht3KFmXPSOX260FBxa4eDN3F2G4R s4eYbR8RxE9yBhonzTAujnlRa7Jse2fMWpCHOlntRqWd+57v39l8xieCDbCRvm+B5sEU smyNUCDFzmUBWjOHJHhbM5NSR0u8+rKggWPxuWxtgYWUd5/5VDs8w6Ww19bnKH+eXxQ8 CtZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/D465Hxu1CTGVT0YjeUGiheXxV054VpJdvrVAlM49Kg=; b=F2G8YbkQiT4iNoExNXjva9EXCclpPuHIDL7vZTr3MtyNFhmNTfUqvR2Na0uXL80Jks 1kZ3wxGeHCnb+rpRfcksuyqta3ATBTYo80QeR4BdZiiu8sDd+hNe86prxg8O+3jX5DsV GMUqzidZibm12FfLl77Tils5ZYkxPcffGQZYv7GDL+dnejGFPbgLyTyJonvVH4PVdc7/ 6wGHrPn7qIuMfGtJP3p9uJDaUdI2tLTS2+92MPA0i/VxZxtHuB2M4Cdlp1SXxggPSSwf 45za5S/3nMf0vjMhf/uTSix9pmroCPrlj6YasbyBmyhCCGQ9W6OZ7IC91sdDzgLeWXy2 a8cg== X-Gm-Message-State: AFqh2kqb5DWGPigg+UaGaTtSCSaVJhb6sttCkDHs4PaPmlHS7+B7BBJT KO7aZYsD0AocLPhGbb4Ofh8= X-Google-Smtp-Source: AMrXdXvjeYvR5w3Qi55d33TPZXdISg+AP9uwrEtdUjofESbufDJ8zEUoB7PPbx7A0m31nIwg4Vg8Ww== X-Received: by 2002:a17:903:234b:b0:192:9f2d:d6b9 with SMTP id c11-20020a170903234b00b001929f2dd6b9mr66690092plh.9.1673505783081; Wed, 11 Jan 2023 22:43:03 -0800 (PST) Received: from jrouhaud (2001-b011-1006-19a3-286a-7bad-2643-e92b.dynamic-ip6.hinet.net. [2001:b011:1006:19a3:286a:7bad:2643:e92b]) by smtp.gmail.com with ESMTPSA id c13-20020a170902d48d00b00174f61a7d09sm3263483plg.247.2023.01.11.22.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 22:43:02 -0800 (PST) Date: Thu, 12 Jan 2023 14:42:59 +0800 From: Julien Rouhaud To: Christophe Pettus Cc: Tom Lane , Ron , pgsql-general Subject: Re: EXPLAIN and FK references? Message-ID: <20230112064259.4rrky3x54o72cefa@jrouhaud> References: <269a6794-aa20-283d-bbc4-8cddaa2038de@gmail.com> <899474.1673503646@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 11, 2023 at 10:13:11PM -0800, Christophe Pettus wrote: > > Also, IIRC, the SELECTs generated to do foreign key checks do appear in > pg_stat_statements, so that might provide a guide to ones that are consuming > an unusually large amount of resources. Yes, but you need to have pg_stat_statements.track = all configured for that, which isn't the default value (and requires superuser privileges to change).