Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizer rejects own Plan [CORE263] #595

Closed
firebird-automations opened this issue May 14, 2002 · 2 comments
Closed

Optimizer rejects own Plan [CORE263] #595

firebird-automations opened this issue May 14, 2002 · 2 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: ded (ded)

Assigned to: @ArnoBrinkman

SFID: 555875#⁠
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,
A INTEGER,
B INTEGER);

ALTER TABLE TEST ADD CONSTRAINT PK_TEST PRIMARY KEY
(ID);

CREATE INDEX TAB ON TEST (A, B);
CREATE INDEX TBA ON TEST (B, A);

SET PLAN;

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
optimizer

select * from test where a=1 or b=1
PLAN (TEST INDEX (TAB,TBA));

exception 284 index TAB cannot be used in the specified
plan

If table have not Primary key plan is accepted. Seems
it affects all versions of IB/FB.

Alexander V.Nevsky.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10287 ] => Firebird [ 14519 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant