Speed up queries over a derived value.
Section: Triggers and generated values
Index a generated column
sql
sql
CREATE INDEX idx_contacts_email_normalized ON contacts(email_normalized);Explanation
High-value when the generated value is used frequently in filters or joins.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Triggers and generated values
Normalize data with a generated column
Compute a lowercased email for indexing or search.
Create an AFTER INSERT trigger
Write to an audit log when a row is created.