Index Usage For EXTRACT(YEAR FROM …), YEAR(…) etc.

Automatic Rewrite of Date and Time Ranges The following chart shows which DBMS rewrites where clause expressions that access the year part of a date or timestamp (or the like) into a range expression such as ts >= DATE'2024-01-01' AND ts < DATE'2025-01-01' . This enables the use of a sort-based index on the ts column. a Unconditionally rewritten — even if only a matching function-based index…