Re:PostgreSQL Full-Text Search: Fast When Done Right (Debunk...
by sgarland on Tuesday April 08, 2025 @10:43PM
(#43628428)
The advantage is when you want to store something for ease of use, but don’t want the disk (and memory, since pages read are loaded into the buffer pool) hit. So here, you could precompute the vector and index it, while not taking the double hit on size.
Re:PostgreSQL Full-Text Search: Fast When Done Right (Debunk...
by brightball on Wednesday April 09, 2025 @08:28PM
(#43639432)
That’s the same benefit in Postgres as creating an index with the result of function.
https://www.postgresql.org/docs/current/ddl-generated-column...
I can’t think of any advantage of a virtual generated column over a generated column for something like a search index where calculating on read would be very slow.
Postgres has been able to create indexes based on the output of functions forever though, which does the job here too.