Issue Details (XML | Word | Printable)

Key: CORE-263
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Arno Brinkman
Reporter: ded
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Optimizer rejects own Plan

Created: 14/May/02 12:00 AM   Updated: 14/Jun/06 09:37 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5.0

Time Tracking:
Not Specified

SF_ID: 555875


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.