pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: ronivaldolopes@hotmail.com
Subject: BUG #17443: Select command does not use brin index when enable_seqscan = on
Date: Mon, 21 Mar 2022 02:44:08 +0000
Message-ID: <17443-543da4d6744b8ef2@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17443
Logged by:          Ronivaldo Lopes
Email address:      ronivaldolopes@hotmail.com
PostgreSQL version: 14.2
Operating system:   Linux Mint
Description:        

For the select command to use the brin index of the id2 field, I have to
change enable_seqscan = off

create temp table teste as
  select s::int as id1, s::int as id2, quote_ident('Nome ' || to_char(s,
'FM00000000'))::varchar(15) as nome
    from generate_series(1,10000000) x(s);

create index teste1 on teste (id1);
create index teste2 on teste using brin (id2);

EXPLAIN (analyze on, wal on, verbose on, format text)
  select id1 from teste where id1 = 1000000;
 
EXPLAIN (analyze on, wal on, verbose on, format text)
  select id2 from teste where id2 = 1000000;



view thread (2+ messages)  latest in thread

Message-ID: <17443-543da4d6744b8ef2@postgresql.org>
Permalink:  ../17443-543da4d6744b8ef2@postgresql.org/
Also on:    postgresql.org/message-id/17443-543da4d6744b8ef2@postgresql.org

 · 

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-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, ronivaldolopes@hotmail.com
  Subject: Re: BUG #17443: Select command does not use brin index when enable_seqscan = on
  In-Reply-To: <17443-543da4d6744b8ef2@postgresql.org>

* 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