Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sj9k5-00Fr4w-A8 for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 03:53:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sj9k2-00GVVe-QG for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 03:53:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sj9k2-00GVVW-FS for pgsql-hackers@lists.postgresql.org; Wed, 28 Aug 2024 03:53:07 +0000 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sj9jw-001mh9-LS for pgsql-hackers@lists.postgresql.org; Wed, 28 Aug 2024 03:53:05 +0000 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-690e9001e01so58870027b3.3 for ; Tue, 27 Aug 2024 20:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724817179; x=1725421979; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IKlU1ao1GIQYuubUnU66N27Jhnu/p6gLWVxfDZuFRME=; b=SeMWPBvh4D5TCZqtwNFF6+erNYqsniVTchRrZ6DA/LM6lUbFxf7b77MCNndeeA6zWN l42FbT5SRCUnc1j3MP4eCr9QxALyvlmALIhfMFY5ghElgmwJTVvDCnPg4GMVRyQB3E5T m51H9kb/WSzqLHJX9tcd/2V3E2ReUcVVFutez+HrGcQvUV/pkkitLMrPzbAWoT/nkz1f Vd5bxqZ72F+QjQoFTU+nMLrKpdYniGLBH/VP1UighsK8IPb+PQwTY8kwFRAx3PTAXaaL fhjGTsfHMGXJt1V4ZsWJ7vo5wRxGDiIKZYo6VDNTc/UfNTLpBo5z8YLQqURyAO/3nMnd kutA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724817179; x=1725421979; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IKlU1ao1GIQYuubUnU66N27Jhnu/p6gLWVxfDZuFRME=; b=DYxWirMjyCp2fcZbdTPKfELCMt+1ndPF27jgaozfisKRL3nOWa9zCTP2DBv42aRTcI I/5KSfb/alrXD0njgCVM/OnNVuggGqLp53odVfPD0fuuLOPQjnTg5bjic+1ZOJXyjiGp eKYs/nXPhfGEyfb8UNFDETZEu7MKdSLv0fze/+6+T9A8O3H3hsTnQqEXZFh0Xk+U1vlt 2a2BZ3EWj/3J+d9CsN7wk1eesCoryT9Jct2qoUYlXUQMtpHk5K8dakNvM1UUBugaTjDP 0tN9EDz4ufyG5vwoemD1V2iGz7ayfACbi8Qj8dtNxjUNPhuCiKeY65kopZalB7/K9h8R nU6Q== X-Forwarded-Encrypted: i=1; AJvYcCWvLi+OHXHTgBKSRvtIe0nihd2bTyAs64taAYKxhe7J581AJEWF7Xo/CaN2PKpvUZzdjTYl63SHYYWCfcfn@lists.postgresql.org X-Gm-Message-State: AOJu0YyreP3o1pMritE2XXqANOYVIReMR2DOxER0908nqTCtziPZny6Y enKZVdyyECPenPdtdBiYlLgXxBp7J13uvC5nz9KFQIWzgHulc6gvoSO07TGsoOHv1EfnlCLqUFZ 0p/S2IrR0jggc1N62Polhj9VZ1tU= X-Google-Smtp-Source: AGHT+IGDN7KRrPtUCREviUSOqGBnxHWW4IK/2KV6nl0e3mmrV8/NYbjXi++Wy5gAu5zjeMD31KLdOK7kW52XGGw251w= X-Received: by 2002:a05:690c:4612:b0:664:badf:5a80 with SMTP id 00721157ae682-6c62924fa0amr139956927b3.28.1724817179179; Tue, 27 Aug 2024 20:52:59 -0700 (PDT) MIME-Version: 1.0 References: <2962669.1724722813@sss.pgh.pa.us> <2965760.1724724227@sss.pgh.pa.us> <3104695.1724775341@sss.pgh.pa.us> <3147330.1724795532@sss.pgh.pa.us> In-Reply-To: From: Richard Guo Date: Wed, 28 Aug 2024 11:52:46 +0800 Message-ID: Subject: Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables. To: Tom Lane Cc: David Rowley , nikhil raj , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Aug 28, 2024 at 11:30=E2=80=AFAM Richard Guo wrote: > On Wed, Aug 28, 2024 at 5:52=E2=80=AFAM Tom Lane wrot= e: > > I realized that actually we do have the mechanism for making that > > work: we could apply add_nulling_relids to the expression, if it > > meets those same conditions. > > I think this should work, as long as we apply add_nulling_relids only > to Vars/PHVs that belong to the subquery in this case, because only > those Vars/PHVs would be nulled by the outer joins contained in the > nullingrels. To be more concrete, I know theoretically it is the whole expression that is nullable by the outer joins, not its individual vars. But in this case if the contained vars (that belong to the subquery) become NULL, the whole expression would be NULL too, because it does not contain any non-strict constructs. That's why I think this approach should work. Thanks Richard