I have a table (in Oracle 12c) with 22 million records so far, and plus 10,000 records inserted every day. We need the counts based on this table, such as:
select col1, col2, count(*) cnt from my_table group by col1, col2; This query will return less than 30 rows, and the combination of col1, col2 will be unique.
Our application needs to check the CNT value frequently, but the approximate values of the CNT are good enough. That means we can create a materialized view and refresh it every 10-20 Minutes.
Is the materialized view a good choice for this requirement, or should I create a regular table for it?
Thanks in advance!!!
col1andcol2(one on each column). Then the query should be much faster.