Submitted By: ded
Optimizer rejects explicitly added plan which is
built by optimizer itself when query contains OR in
where clause and have Primary key.
CREATE TABLE TEST (
ID INTEGER NOT NULL,
ALTER TABLE TEST ADD CONSTRAINT PK_TEST PRIMARY KEY
CREATE INDEX TAB ON TEST (A, B);
CREATE INDEX TBA ON TEST (B, A);
select * from test where a=1 or b=1;
PLAN (TEST INDEX (TAB,TBA))
- showed plan.
Now trying to explicitly add this plan builded by
select * from test where a=1 or b=1
PLAN (TEST INDEX (TAB,TBA));
exception 284 index TAB cannot be used in the specified
If table have not Primary key plan is accepted. Seems
it affects all versions of IB/FB.