hot.sql

application/sql

Filename: hot.sql
Type: application/sql
Part: 1
Message: Re: [PATCH] Don't block HOT update by BRIN index
drop table if exists t;
create table t (a int, b int);
insert into t values (1, 100);
create index on t using brin (b) where a = 2;

explain analyze select * from t where a = 2 and b = 100;
set enable_seqscan = off;
explain analyze select * from t where a = 2 and b = 100;

reset enable_seqscan;
update t set a = 2;

explain analyze select * from t where a = 2 and b = 100;
set enable_seqscan = off;
explain analyze select * from t where a = 2 and b = 100;