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

View with "subselect" column join table and not use index [CORE3176] #3550

Closed
firebird-issue-importer opened this issue Oct 13, 2010 · 9 comments
Closed

Comments

@firebird-issue-importer

Submitted by: Pavel Vakeš (goffix)

Is related to CORE3090
Is related to QA446

Votes: 1

CREATE TABLE TMP
(
ID Integer NOT NULL,
CONSTRAINT PK_TMP_1 PRIMARY KEY (ID)
);

CREATE VIEW TMP_VIEW (ID1, ID2)
AS
SELECT 1,(SELECT 1 FROM RDB$DATABASE) FROM RDB$DATABASE;

/*** With view + subselect column ***/

SELECT * FROM tmp_view TV LEFT JOIN tmp T ON T.id=TV.id2

> PLAN JOIN (TV RDB$DATABASE NATURAL, T NATURAL)

- PK_TMP_1 is not used.

/*** With view + normal column ***/

SELECT * FROM tmp_view TV LEFT JOIN tmp T ON T.id=TV.id1

> PLAN JOIN (TV RDB$DATABASE NATURAL, T INDEX (PK_TMP_1))

- PK_TMP_1 is used.

/*** Without view + subselect column ***/

SELECT * FROM RDB$DATABASE TV LEFT JOIN tmp T ON T.id=(SELECT 1 FROM RDB$DATABASE)

> PLAN JOIN (TV NATURAL, T INDEX (PK_TMP_1))

- PK_TMP_1 is used.

In FB 2.1.3 and FB 2.5 RC3 is PK_TMP_1 used.

Commits: dbd1775 e78cf74 FirebirdSQL/fbt-repository@1185d93

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 13, 2010

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 13, 2010

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 13, 2010

Modified by: @dyemanov

Link: This issue is related to CORE3090 [ CORE3090 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 13, 2010

Commented by: @dyemanov

This regression is caused by the fix for CORE3090.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 20, 2011

Modified by: @dyemanov

status: In Progress [ 3 ] => Open [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 20, 2011

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 24, 2011

Modified by: @pcisar

Link: This issue is related to QA446 [ QA446 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 4, 2013

Modified by: @pmakowski

status: Resolved [ 5 ] => Closed [ 6 ]

Fix Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 19, 2015

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

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

Successfully merging a pull request may close this issue.

None yet
2 participants