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
PK index is not used for derived tables [CORE2910] #3294
Comments
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovstatus: Open [ 1 ] => In Progress [ 3 ] |
Modified by: @dyemanovstatus: In Progress [ 3 ] => Open [ 1 ] |
Modified by: @asfernandesassignee: Dmitry Yemanov [ dimitr ] => Adriano dos Santos Fernandes [ asfernandes ] status: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 RC3 [ 10381 ] |
Commented by: @samofatov Thanks a lot, Andriano! This was pretty important issue for us as it broke replication and materialized views support. |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @dmitry-starodubov
Is related to QA433
create database 'test.fdb';
set plan on;
CREATE TABLE R$TMP (
POSTING_ID INTEGER
);
CREATE TABLE TMP (
POSTING_ID INTEGER NOT NULL
);
ALTER TABLE TMP ADD CONSTRAINT PK_TMP PRIMARY KEY (POSTING_ID);
select r.POSTING_ID as r$POSTING_ID, t.POSTING_ID from (
SELECT POSTING_ID
FROM r$tmp
) r left join (
select POSTING_ID from
(select
posting_id
from tmp)
) t on r.POSTING_ID = t.POSTING_ID;
drop database;
This SELECT in FB 2.1 and FB-HEAD uses such plan:
PLAN JOIN (R R$TMP NATURAL, T TMP INDEX (PK_TMP))
And FB 2.5 doesn't use primary key index :
PLAN JOIN (R R$TMP NATURAL, T TMP NATURAL)
Commits: 05b983b
The text was updated successfully, but these errors were encountered: