Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
10.6.1.0
-
None
-
Low
-
Performance
Description
The suggestion is similar to generated columns, but with the column value not actually stored in the database, but rather recalculated whenever the column is accessed.
This saves storage space in return for additional processing.
It is also suggested to support creating indices on the calculated columns; this could be a partial solution to expression-based indexes (Derby-455). For instance, creating an index on an expression such as "upper (column)" requires Derby to recognize the expression in a query involving the column, so that it could take advantage of the index; this could be difficult for more complex expressions. Using a generated column would double the required storage for the original column. An auto-computed column could solve both problems.
(I don't know if there is any standard SQL syntax for defining such columns)