Hi,
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
This should be a dumb question!
My application has a very big Partitioned(sub-partitioned as well) table say T_RCE . This table is partitioned on the column PRICE_TYPE_KEY and further sub-partitioned on FROM_DT.
While querying this table if any query is using TRUNC function looks like Partition Pruning is not happening its working fine when there is no TRUNC.
Is there anyway we can make the optimizer to do the desired partition prune with and without TRUNC? I know I can request for a code change but just wonder if there is anyway we can do this!
select * from T_RCE where price_type_key=3 and trunc(from_dt) >'01-Nov-2019'
Without Trunc : Scanning 71 to 74 partitions

With Trunc: Scanning 1 to 74 Partitions

Regards
Hesh