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 1rtVsI-00FHwb-VC for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2024 17:00:11 +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 1rtVsH-009N4O-Pb for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2024 17:00:09 +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 1rtVsH-009N4G-G5 for pgsql-hackers@lists.postgresql.org; Sun, 07 Apr 2024 17:00:09 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rtVsD-001gG2-HM for pgsql-hackers@lists.postgresql.org; Sun, 07 Apr 2024 17:00:08 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2d4360ab3daso42657351fa.3 for ; Sun, 07 Apr 2024 10:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712509203; x=1713114003; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=K3pXE71ZNFvrd2H9mcR81rOVV8x07szj40IScwlVTJ0=; b=ToqxDQ4kf2zHPDqZi+g9BAlwBFVInWxBb1IBZzHlKwWjhpuLoM0QEbkS3QdDl6Z6EB 2BNBzUR0KYuSsoZB/bj701y+i2w16YUfsqTbWh8T4uZuuxRUM4tgyoY35sqPm5Js7kwr ZhUq6HTq90OWrxc91FWRHDJe+LvQYAYUBB+mr5blIc9KvVYHqvq/71MtDBUtSKWMsmUJ wg+w2IjEHQVb5h+Za6uXcyCXbrpe18nJQ/Y0OhQvQ5KP24rNFujllMDgBHUn0KBu34MV GH2TZVemesAYUfEBEIOIuYfOl3DhGNb0b/iGK8gV81mlFVIIwXyqcIbbO8fM5yApklp5 5pXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712509203; x=1713114003; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K3pXE71ZNFvrd2H9mcR81rOVV8x07szj40IScwlVTJ0=; b=Kd1aky1nsOBiAjRYDK5kA7WuiQwAGoykqL9vUDVCNdSmQYZzoRDUdGfNWfvBYw39iq dXDvlye5nQ/4hDVayag/1LdDLff8uoaXr/zJf9SeckktpokgOLrMtj1DAyzaWYJo/QVI R9BXGNd/lJvBGrpQVyUZM16puSF0EnWIvxkrvv/ZDPh8Vzg6mHFmEbAa5r4VkUDYyLh3 vFaGalbDEqJAAWCRMNJDORGkss/xe7YSmPestnRc2EAucMqIkKPICRqYzjCSClwjloKi t1rhUijDc9F75Te4CYIUIlxigsSfGoA84AFABsszbQ3PyvxF26rvJKbdfK6IcpzijxJW hO6w== X-Gm-Message-State: AOJu0YxC8UA2Ud5Xpei+XuhwO7KF6I00qB/vDNqma31W/qqm3cVR8cx9 myIh0/PcKUT/GUAK55/5c4ZHmmdN3/ttayJb89O88/2zHKZTPMG5 X-Google-Smtp-Source: AGHT+IHM1P2rw9quEB0vDPpPCSef7PWeiAD66r9vR+ZsGRY0MTXGlN/pOqWU33swuZDwgfEZ+6O6Ng== X-Received: by 2002:a05:6512:224d:b0:516:cef7:1042 with SMTP id i13-20020a056512224d00b00516cef71042mr4632777lfu.11.1712509202661; Sun, 07 Apr 2024 10:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.25.248]) by smtp.gmail.com with ESMTPSA id w21-20020a19c515000000b00515b1b2c17csm856646lfe.262.2024.04.07.10.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Apr 2024 10:00:02 -0700 (PDT) Message-ID: <0539d3d3-a402-0a49-ed5e-26429dffc4bd@gmail.com> Date: Sun, 7 Apr 2024 20:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan Content-Language: en-US To: Peter Geoghegan , Matthias van de Meent Cc: PostgreSQL Hackers , Tom Lane , Tomas Vondra , Jeff Davis , benoit , Alexander Korotkov , Heikki Linnakangas References: From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Peter, 03.04.2024 22:53, Peter Geoghegan wrote: > On Mon, Apr 1, 2024 at 6:33 PM Peter Geoghegan wrote: >> Note: v18 doesn't have any adjustments to the costing, as originally >> planned. I'll probably need to post a revised patch with improved (or >> at least polished) costing in the next few days, so that others will >> have the opportunity to comment before I commit the patch. > Attached is v19, which dealt with remaining concerns I had about the > costing in selfuncs.c. My current plan is to commit this on Saturday > morning (US Eastern time). Please look at an assertion failure (reproduced starting from 5bf748b86), triggered by the following query: CREATE TABLE t (a int, b int); CREATE INDEX t_idx ON t (a, b); INSERT INTO t (a, b) SELECT g, g FROM generate_series(0, 999) g; ANALYZE t; SELECT * FROM t WHERE a < ANY (ARRAY[1]) AND b < ANY (ARRAY[1]); TRAP: failed Assert("so->numArrayKeys"), File: "nbtutils.c", Line: 560, PID: 3251267 Best regards, Alexander