I am trying to avoid Full Table Scans on one of our big tables. I tried to create a filter, but it is working fine for the queries which are referring only this table. If we join with other lookup/dimention tables, it is throwing error (filter error) as it is seeing full table scan on those small tables.
Example: Tablename: Sales --- parition on 'txn_date'
Filter runs fine for below query:
sel * from Sales; --> this throws Filter error as expected.
sel* from Sales where txn_date = date-1; --> as expected, filter doesn't stop this query, this returns rows.
But, I am expecting below query also to be successful:
sel d.dpt_id, s.total_sales
from Sales s
where s.dpt_id = s.dpt_id
and txn_date = date-1
This filter is stopping this query also. Because, it is going with full table scan on table 'dept'.
As a workaround I can put table 'dept' in 'exclude' objects list. But, this list will be very huge.
In future, if some new tables comes and joins with this big table, it will throw error again.
Please let me know if any way to achieve this.
Briefly, I don't want to allow any qery which is accessing table 'Sales' without condition on 'tdn_date', I don't bother about FTS on all other tables.