Yes. And probably a lot.
You never gain performance using
char(n)). You don't gain anything at all because that type is outdated, mostly useless, and discouraged. Related:
But you saw that bit in the quote from the manual where it says:
apart from increased storage space when using the blank-padded type
char(n) is the blank-padded type. And column names like
comment indicate mostly blank-padded waste.
varchar remove the bloat and everything around your table becomes substantially faster, as your avg. row size probably shrinks to less than half. More tuples per data page means fewer pages to read and process per query, and that is the most important factor for performance there is.
While being at it, order columns favorably to make it more efficient, yet:
Column | Type | Collation | Nullable | Default
orderkey | integer | | not null |
custkey | integer | | |
orderdate | date | | |
shippriority | integer | | |
totalprice | numeric(12,2) | | |
orderstatus | varchar(1) | | |
orderpriority | varchar(15) | | |
clerk | varchar(15) | | |
comment | varchar(79) | | |
I kept the length restrictions with
varchar(n), but if those are just arbitrary, use
text instead. A tiny bit faster, yet. (And less corner-case hassle.) See: