Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1inPQ6-0006zC-BJ for pgsql-performance@arkaria.postgresql.org; Fri, 03 Jan 2020 16:03:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1inPQ4-0002iO-MU for pgsql-performance@arkaria.postgresql.org; Fri, 03 Jan 2020 16:03:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1inPQ4-0002gX-3Y for pgsql-performance@lists.postgresql.org; Fri, 03 Jan 2020 16:03:24 +0000 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1inPQ0-0006hu-UA for pgsql-performance@postgresql.org; Fri, 03 Jan 2020 16:03:22 +0000 Received: by mail-yb1-xb32.google.com with SMTP id f136so15644747ybg.11 for ; Fri, 03 Jan 2020 08:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kHAAzPPK2uQ94c3FFGjRH9o2m3HIkKFcX/9FyY/lP54=; b=p8owakszkOlOrURfSX1o4xoPfRq3uhIDgUtAvZLFq4xUM/1SfJIJQkLOTydMgdxROv wJ64QZurs5DY42OQHnbZDRYXS8xzvKnGcp8dbJOWJaVOZ0HTwlU3OLz/wRce5orGXq3c 8a51v0wlhJrU09h1S+8F3JhzCFNDjvRAHMbfMwT5cE1yOqKKX0kgJmTZmd+zXk61TlK8 zgQplM2cvuBx+5p2us23wVKUtsE8o/gJm92IJb24iQJrEhyp1AZRdtcl/1wTRWkd6qQp UfYvqk/mSlNkhnWSw+R5cq/FuiywwfT/+2tgKNg1yYYTHbuUGkZic1l9Rqm9Awi0HGum XJ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kHAAzPPK2uQ94c3FFGjRH9o2m3HIkKFcX/9FyY/lP54=; b=Lzuv51y/fB5FfO6L7ayl2gfPgT18e+G3Tuig1LBh11F2zyh/R1XRMKHD6ymp0NpVWW 6QHTAKsrrJG+dy/jK9/5c/MjUABPS3eGuuxnsZ95TQ/QDJ6sZmGsXP/BHZ4xaxKhhIcM o9oODj9EljBHtO6ioPpWjWDUM/rbS1pcJudPMcJz+tlDvw33zTF++JuJWVChZWypqeTb X+R90VLTzluAIWVAcLM3osnWfmwezkXs6kH2qxcWG3spnWnzvgVruvgQNit/HVvtyL2h GfwztyZF/0Kzbn2/YtAGP7c2T8Pfc6YA0WUAZSAGYweUtsBKRJoeKehKDvvnW6lPzQFv cj1w== X-Gm-Message-State: APjAAAWeYWLy3XHn428aH/uX1MbwP82CCLr0H/voCjHuGtLyotAHdLtf 7V6DNwxqSkDJdGBi/FVQ7kcAkw== X-Google-Smtp-Source: APXvYqw9RHbquLsSgPGEf7WFTPiIMU6jaRxLbyfFDJuMCEs5Z94D5BpVl3xBYaMzRCZk29Ih91PglA== X-Received: by 2002:a25:701:: with SMTP id 1mr42366992ybh.96.1578067399932; Fri, 03 Jan 2020 08:03:19 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e76sm23896930ywe.25.2020.01.03.08.03.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jan 2020 08:03:17 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 76CDD800831; Fri, 3 Jan 2020 10:03:15 -0600 (CST) Date: Fri, 3 Jan 2020 10:03:15 -0600 From: Justin Pryzby To: Jeff Janes Cc: pgsql-performance@postgresql.org Subject: Re: distinguish index cost component from table component Message-ID: <20200103160315.GL12066@telsasoft.com> References: <20200103141427.GK12066@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 03, 2020 at 09:33:35AM -0500, Jeff Janes wrote: > Of course this doesn't really answer your question, as the > separately-reported costs of a bitmap heap and bitmap index scan are > unlikely to match what the costs would be of a regular index scan, if they > were reported separately. I think the cost of index component of bitmap scan would be exactly the same as the cost of the original indexscan. >> Or maybe explain should report it. > > I wouldn't be optimistic about getting such a backwards-incompatible change > accepted (plus it would surely add some small accounting overhead, which > again would probably not be acceptable). But if you do enough tuning work, > perhaps it would be worth carrying an out-of-tree patch to implement that. > I wouldn't be so interested in writing such a patch, but would be > interested in using one were it available somewhere. I did the attached in the simplest possible way. If it's somehow possible get the path's index_total_cost from the plan, then there'd be no additional overhead. Justin --PNTmBPCT7hxwcZjr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-explain-show-index_total_cost.patch"