Due to performance reasons, we set up an expression index on our table in our Postgres database.
send_date is of type
timestamptz, but due to performance reasons we built the index with an expression:
(user_id, date(timezone('UTC'::text, send_date)) DESC NULLS LAST)
Effectively now I have to query:
SELECT * FROM emails WHERE date(timezone('UTC', send_date)) > '2019-12-21'
Is there a possibility to change the column type or add a virtual column that applied this expression?
Or should I go for a view in Postgres then?