SQL Fundamentals

String Functions & Operations: Interview

Why can wrapping an indexed text column in LOWER or TRIM slow a filter? A normal index stores the original column value. Applying a function changes the searche

Why can wrapping an indexed text column in LOWER or TRIM slow a filter?

A normal index stores the original column value. Applying a function changes the searched expression, so the optimizer may need a full scan unless the database has a matching functional or computed-column index.

Separate normalization at write time from presentation formatting at read time.