To enhance our data security, we have recently updated user permissions to restrict the ability to write, modify, or delete data and tables. Consequently, users are now limited to performing select operations only.
However, this new security policy has impacted several queries that rely on materialization, such as:
with
/*+ENABLE_WITH_CLAUSE_MATERIALIZATION */
orders as (
select * from order_table where created_at::date >= '2022-01-01'::date
)
select * from orders
Due to the policy change, these queries can no longer execute because they require materialization to complete within acceptable run times. Without materialization, the queries exceed our runtime threshold.
Is there a way to maintain the current read-only policy for users while still allowing them to use the ENABLE_WITH_CLAUSE_MATERIALIZATION hint?