Unconventional PostgreSQL Optimizations
hakibenita.com
Unconventional PostgreSQL Optimizations
1–10 of 72 posts
Re: Unconventional PostgreSQL Optimizations
#2It's interesting how both virtual columns and hash indexes work, but feel like they're bolted on, vs being made part of the whole ecosystem so that they work seamlessly.
Re: Unconventional PostgreSQL Optimizations
#3Re: Unconventional PostgreSQL Optimizations
#4I think a stored generated column allows you to create an index on it directly. Isn't it better approach?
Re: Unconventional PostgreSQL Optimizations
#5I think a stored generated column allows you to create an index on it directly. Isn't it better approach?
> Starting at version 14, PostgreSQL supports generated columns - these are columns that are automatically populated with an expression when we insert the row. Sounds exactly like what we need but there is a caveat - the result of the expression is materialized - this means additional storage, which is what we were trying to save in the first place!
Re: Unconventional PostgreSQL Optimizations
#6I think a stored generated column allows you to create an index on it directly. Isn't it better approach?
The article explains why they want to avoid this option: > Starting at version 14, PostgreSQL supports generated columns - these are columns that are automatically populated with an expression when we insert the row. Sounds exactly like what we need but there is a caveat - the result of the expression is materialized - this means additional storage, which is what we were trying to save in the first place!
Re: Unconventional PostgreSQL Optimizations
#7Re: Unconventional PostgreSQL Optimizations
#8I think a stored generated column allows you to create an index on it directly. Isn't it better approach?
Is it also possible to create index (maybe partial index) on expressions?
Re: Unconventional PostgreSQL Optimizations
#9PG's lack of plan caching strikes again, this sort of thing is not a concern in other DB's that reuse query plans.