create table tbl as
select * from generate_series(1,200000) g(x);
create index on tbl(x) where x % 170 = 0;
analyze tbl;
explain(analyze)
select count(*) from tbl
where x % 170 = 0;
explain(analyze)
select count(*) from tbl;
explain(analyze)
select count(*) filter (where x % 170 = 0) from tbl;