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 1oiVy6-0008Fy-CK for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2022 07:15: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 1oiVy5-0000SR-9A for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2022 07:15:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiVy4-0000SF-Uw for pgsql-hackers@lists.postgresql.org; Wed, 12 Oct 2022 07:15:52 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oiVy2-0003HU-23 for pgsql-hackers@lists.postgresql.org; Wed, 12 Oct 2022 07:15:52 +0000 Received: by mail-wr1-x42c.google.com with SMTP id bp11so12127992wrb.9 for ; Wed, 12 Oct 2022 00:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aiven.io; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :organization:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=xhndX7SSEm6BFK8hOf/0Cyihu/QmTF0p/UCS/rBnc6g=; b=pGTfnwY4hJ9Rk3KUlOc9fdWXFBX3sJ7oXqga78CQfJY4sEL4ncfMiTBdt0cf/V1XhU mHLEU99TiOKYkDSJvQcpFTA+YyzXZk7n/bWrdRLYX9/pLaekoStdBRi1iPJwFoREbnie u783P6QaWyKmW5dHNmikjLNDutNj/49QUiaHQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :organization:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xhndX7SSEm6BFK8hOf/0Cyihu/QmTF0p/UCS/rBnc6g=; b=xUwwRBfP7fnGHEHw6oar+8mqwu8gzM6vbaFCvkh8HncR6ek0wKvJB3LL7bwMmq0zd0 /DeV2/dnuCrS3hWqMxpgkiI7f83lVbAxvtF2I3YpKmNEQN4jDNj2UJ6DdZ0w2P0B34lK iolu6hwkf4LvKbLpeiWm3jLgunQ/+G3XDMdPy483BSb/dYFXjtBMjh0sziDU+VvHnfbF 1mBtkzlnbid39o/3hDmcn0/NSWnpijc7jsU3j7ANsubUiQeX9PDXWyFHDjEyTPsxIp61 C0Obor+fG8WpAweHoc81sMrh7ChDj0lnnBmcRlA4DNCQY4VeG4ZLtuBTep6KfJKrV2Qt 9Vvw== X-Gm-Message-State: ACrzQf0PF5RHnnY7Cd3f5TwG9qOGujkHzj2ZoYW1fovyi2KZxxDajXNE YdGJ6lV4laZ4N8VxPxsXgeUxIw== X-Google-Smtp-Source: AMsMyM53bYWC9Ys9r/0C4XUhPao+a4GN6SXcr2qbKhxNvlewfZekGKTq5dOhn6qsjTqqHVjvLiO77Q== X-Received: by 2002:a05:6000:1ace:b0:22f:7201:74c0 with SMTP id i14-20020a0560001ace00b0022f720174c0mr12731001wry.216.1665558948881; Wed, 12 Oct 2022 00:15:48 -0700 (PDT) Received: from aivenronan.localnet ([45.13.105.93]) by smtp.gmail.com with ESMTPSA id ay38-20020a05600c1e2600b003c6b70a4d69sm942824wmb.42.2022.10.12.00.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 00:15:48 -0700 (PDT) From: Ronan Dunklau To: Michael Paquier Cc: Tom Lane , pgsql-hackers@lists.postgresql.org Subject: Re: Fix gin index cost estimation Date: Wed, 12 Oct 2022 09:15:10 +0200 Message-ID: <12071145.O9o76ZdvQC@aivenronan> Organization: aiven In-Reply-To: References: <3188617.44csPzL39Z@aivenronan> <4768224.31r3eYUQgx@aivenronan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > > You're right, I was too eager to try to raise the CPU cost proportionnally to > > the number of array scans (scalararrayop). I'd really like to understand where > > this equation comes from though... > > So, what's the latest update here? Thanks Michael for reviving this thread. Before proceeding any further with this, I'd like to understand where we stand. Tom argued my way of charging cost per entry pages visited boils down to charging per tuple, which I expressed disagreement with. If we can come to a consensus whether that's a bogus way of thinking about it I'll proceed with what we agree on. -- Ronan Dunklau