4 ms·
>I 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 i
by zenmac 8mo ago
>I 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?
- masklinn 8mo agoThat's the first solution (a function based index), however it has the drawback of fragility: a seemingly innocent change to the query can lead to not matching the index's expression anymore). Which is why the article moves on to generated columns.