Expression Index in RDBMS

What is the expression index?

According to the description from Wikipedia

An expression index, also known as a function based index, is a database index that is built on a generic expression, rather than one or more columns. This allows indexes to be defined for common query conditions that depend on data in a table, but are not actually stored in that table.

When you query on something that is computed from other columns frequently and want to speed it up, you will need this.

I will use PostgreSQL as an example in this article because it is my favorite database.

繼續閱讀