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 1su6Yn-004AzW-0o for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Sep 2024 08:42:46 +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 1su6Yk-005gSq-WD for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Sep 2024 08:42:43 +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 1su6Yk-005gSe-JE for pgsql-hackers@lists.postgresql.org; Fri, 27 Sep 2024 08:42:42 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1su6Ye-001I81-8n for pgsql-hackers@lists.postgresql.org; Fri, 27 Sep 2024 08:42:41 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2f75428b9f8so26420081fa.3 for ; Fri, 27 Sep 2024 01:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1727426554; x=1728031354; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=uE7RGaDDLV5pHMgsy6gxSBzNTSv5FGT5IfEtn+kl7DQ=; b=r/WGxauO62j3aIxK3GiwlTySKN91W8b7rorohqsFrohotogyHWc7Jl10E9NwgmKows MRDiy9tBaSAURKPcuZcLfn57D2rIOCo5444pXe9zfFgtSv3gYHQ63MtlruK3/D1BpmLO kF7OBus7cxb5zr8UtMBQfzISZjOdQY1pwMhwkKPnHS2cemGCrSdmPrHIppBre7vs05yP 2dX7P+xqdTQKHiJZ+F7wI8E4FIBYaEdw9Q2WDlbM53q6dlRIC/bRKfOEzYtGy65Dn64o diCA5QPLhSLl0RFgXlMyZuYRE2NHrm+1XGbu/E4wqyatok99Ij+L1q8J0FlkAG+oxp82 uIFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727426554; x=1728031354; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uE7RGaDDLV5pHMgsy6gxSBzNTSv5FGT5IfEtn+kl7DQ=; b=mUBKCBFw0EkkZv4CXQNQCVrfZFAAYBJZGlTrZsWDzGjFp6J/D4iFF4S9dg8UbrYR7L 5jYbjZtL3hJrmHV/R9cW4lu0a4uoov00Aq7lt02ad2YuvOXuCvyAEFljobuB6qEPacXC iiTaAFSZUuCzp8kw2LpFz/77DTYmbbOpuW9VzJtfi2G+X/ibg9IbMY3z6hQwuPMYtzHW Mx6K9+vLmvZiKTWeGInmCuyXMKZWGnZdmYJDRKr0sSQRMUoPRrnzayGNOTqRRdBaJOPu A3FamuXCAwDP2pueWotqOQ/+pV/QXBuDTjbYavkirdPnwqqE3IcDakAlLobFOrJ4loM6 1Ycw== X-Forwarded-Encrypted: i=1; AJvYcCVMicUf3DM6IDReeYHeQFJx5tt/3T74IPawdwFalmECCTwNk4ZMtvNsFu6Cz5qoUSxjM7vbpv9FW/Y77rIE@lists.postgresql.org X-Gm-Message-State: AOJu0YyhDsOAuf6dqOgVbp2ThHEyeqSl1gB4mTl/A9xiELPoozUvjUnx 2/IPtqRKsuGcFQtBqy5Mv5uZQlmipsF3R9Sfrscx5Hv5VrGJibnx/UF7usWBR0tkiNaRrgFHSva n X-Google-Smtp-Source: AGHT+IEL/Qvndcw5kffRDo7nVZJ6FG1iUSdjULo5CCPdILOuEl1MjP8DM8ZOusYcsNzaEti3xRg6cQ== X-Received: by 2002:a05:6512:1307:b0:533:3fc8:9ab9 with SMTP id 2adb3069b0e04-5389fc4c9f7mr2382021e87.34.1727426553955; Fri, 27 Sep 2024 01:42:33 -0700 (PDT) Received: from dynamic-pd01.res.v6.highway.a1.net ([2001:871:260:b526:d09:e557:1fbf:f47a]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2948013sm102590266b.130.2024.09.27.01.42.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 01:42:33 -0700 (PDT) Message-ID: <9e4ad616bebb103ec2084bf6f724cfc739e7fabb.camel@cybertec.at> Subject: Re: On disable_cost From: Laurenz Albe To: Robert Haas , Tom Lane Cc: David Rowley , Heikki Linnakangas , Peter Geoghegan , PostgreSQL Hackers Date: Fri, 27 Sep 2024 10:42:32 +0200 In-Reply-To: References: <591b3596-2ea0-4b8e-99c6-fad0ef2801f5@iki.fi> <3114837.1719942038@sss.pgh.pa.us> <3121096.1719945445@sss.pgh.pa.us> <3127390.1719949016@sss.pgh.pa.us> <708d5715-bc5a-485a-a437-383a1298f5aa@iki.fi> <3985903.1722617472@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-1.fc40) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2024-08-21 at 10:29 -0400, Robert Haas wrote: > I went ahead and committed these patches. I know there's some debate > over whether we want to show the # of disabled nodes and if so whether > it should be controlled by COSTS, and I suspect I haven't completely > allayed David's concerns about the initial_cost_XXX functions although > I think that I did the right thing. But, I don't have the impression > that anyone is desperately opposed to the basic concept, so I think it > makes sense to put these into the tree and see what happens. We have > quite a bit of time left in this release cycle to uncover bugs, hear > from users or other developers, etc. about what problems there may be > with this. If we end up deciding to reverse course or need to fix a > bunch of stuff, so be it, but let's see what the feedback is. I am somewhat unhappy about the "Disabled Nodes" in EXPLAIN. First, the commit message confused me: it claims that the information is displayed with EXPLAIN ANALYZE, but it's shown with every EXPLAIN. But that's not important. My complaints are: 1. The "disabled nodes" are always displayed. I'd be happier if it were only shown for COSTS ON, but I think it would be best if they were only shown with VERBOSE ON. After all, the messages are pretty verbose... 2. The "disabled nodes" are not only shown at the nodes where nodes were actually disabled, but also at every nodes above these nodes. This would be fine: Sort -> Nested Loop Join -> Hash Join -> Index Scan Disabled Nodes: 1 -> Hash -> Index Scan Disabled Nodes: 1 -> Index Scan Disabled Nodes: 1 This is annoying: Sort Disabled Nodes: 3 -> Nested Loop Join Disabled Nodes: 3 -> Hash Join Disabled Nodes: 2 -> Index Scan Disabled Nodes: 1 -> Hash -> Index Scan Disabled Nodes: 1 -> Index Scan Disabled Nodes: 1 I have no idea how #2 could be implemented, but it would be nice to have. Please, please, can we show the "disabled nodes" only with VERBOSE? Yours, Laurenz Albe