I have a production table that has 2.5 Billion rows. It has a column "created_date", which has both date and time components. The table is not partitioned. I have to export 2 months of data based on the "created_date" value. My options are either (1) to create a function based index "TRUNC(created_date)" on the column ; or, (2) create a virtual column as "TRUNC(created_date)" and then index that virtual column. Then I run a query-based expdp on this table using that index.
Since there is no way for me to test which approach is better (even slightly better will work because its a production table with no downtime), has anyone any advice on this matter ? My assumption is the having a virtual column will not cause an index calculation operation every time a row is inserted into this table (about 7 Million new rows per day), which will definitely happen for a function-based index. Any advice ? Also, does anyone have any idea how much time such an index creation (on 2.5 Billion rows) may take ?