Create an index on a table that is based on a function call or expression rather than just column.

create index month_only 
    on orders (extract(month from order_date));

Such an index can be used by queries like the following:

select count(*)
from orders
where extract(month from order_date) = 8;

Back to the SQL Feature Comparison