Hi!
Thank you.
People often looks for different period sales using different filters.
There are lot of sales and every sale is individual record in sales table.
So increasing sequential scan speed is important.
I tried
create table t1(v char(100), p numeric(12,5));
create table t2(v varchar(100), p numeric(12,5));
insert into t1 select '', generate_series from generate_series(1,1000000);
insert into t2 select '', generate_series from generate_series(1,1000000);
and after that measured speed of
select sum(p) from t1
and
select sum(p) from t2
both of them took approximately 800 ms
So it looks like thee is no difference in sequential scan speed and thus no
need to change char types.
Andrus