pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Bloom index cost model seems to be wrong
Date: Tue, 12 Feb 2019 10:41:58 -0500
Message-ID: <2126.1549986118@sss.pgh.pa.us> (raw)
In-Reply-To: <dc54f6e8-c6bf-6869-08c2-de855de470ae@gmx.net>
References: <dc54f6e8-c6bf-6869-08c2-de855de470ae@gmx.net>

Thomas Kellerer <spam_eater@gmx.net> writes:
> The bloom index is only used if either Seq Scan is disabled or if the random_page_cost is set to 1 (anything about 1 triggers a Seq Scan on my Windows laptop). 

Hm.  blcostestimate is using the default cost calculation, except for

	/* We have to visit all index tuples anyway */
	costs.numIndexTuples = index->tuples;

which essentially tells genericcostestimate to assume that every index
tuple will be visited.  This obviously is going to increase the cost
estimate; maybe there's something wrong with that?

I notice that the bloom regression test script is only testing queries
where it forces the choice of plan type, so it really doesn't prove
anything about whether the cost estimates are sane.

			regards, tom lane




view thread (12+ messages)  latest in thread

Message-ID: <2126.1549986118@sss.pgh.pa.us>
Permalink:  ../2126.1549986118@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2126.1549986118@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, spam_eater@gmx.net, pgsql-performance@lists.postgresql.org
  Subject: Re: Bloom index cost model seems to be wrong
  In-Reply-To: <2126.1549986118@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox