Skip to content
  • Erik Froseth's avatar
    e6f5f91e
    WL#1075 Add support for functional indexes · e6f5f91e
    Erik Froseth authored
    This patch adds support for functional indexes by creating an indexed hidden
    generated virtual column for each functional key part specified by the user. A
    functional index can be specified by using an extra set of parenteses around
    each key part: CREATE INDEX func_index ON t ((ABS(col1)), col2, (col3 + col4));
    By re-using the functionality for indexed generated columns, the server already
    knows how to use any functional index if applicable.
    
    Generally, functional indexes follows the same rules and limitations as indexed
    generated columns (indexed expressions must be deterministic etc.). An extra
    column is added to EXPLAIN output,INFORMATION_SCHEMA.STATISTICS and SHOW KEYS
    output that prints the expression of the relevant index.
    
    Change-Id: Ib74077dc711dbaf5cf64b5918b21d269a0459499
    e6f5f91e
    WL#1075 Add support for functional indexes
    Erik Froseth authored
    This patch adds support for functional indexes by creating an indexed hidden
    generated virtual column for each functional key part specified by the user. A
    functional index can be specified by using an extra set of parenteses around
    each key part: CREATE INDEX func_index ON t ((ABS(col1)), col2, (col3 + col4));
    By re-using the functionality for indexed generated columns, the server already
    knows how to use any functional index if applicable.
    
    Generally, functional indexes follows the same rules and limitations as indexed
    generated columns (indexed expressions must be deterministic etc.). An extra
    column is added to EXPLAIN output,INFORMATION_SCHEMA.STATISTICS and SHOW KEYS
    output that prints the expression of the relevant index.
    
    Change-Id: Ib74077dc711dbaf5cf64b5918b21d269a0459499
Loading