Hi All,
SE 12.1
For some reason I was under the impression that if you have a check constraint on a column,that stops particular entries being inserted, when you query that column with a value that isn't allowed by the constraint, the optimiser would check the constraint first before continuing with the query, and not actually search for it..
i.e.
alter table TAB1 add constraint
not_a check ( COL_1 != 'A')
select * from TAB1 where COL_1 = 'A'
This query would not actually search the table TAB1. Looking at the explain plan, its still doing a search for A via its index..
I'm asking, because Im looking at putting together a manual partitioning solution by creating multiple tables with different partition data, adding constraints on what data is allowed in each table. Then creating a view on them with a union of the tables. When testing however, the plan is still showing than its accessing each table and searching..
Many Thanks
Richard