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
DB_KEY based join of two tables may be ineffective [CORE4530] #4848
Comments
Modified by: @dyemanovreporter: Dmitry Yemanov [ dimitr ] => Pavel Zotov [ tabloid ] assignee: Dmitry Yemanov [ dimitr ] |
Commented by: @doychin This can also be ported back to 2.1.x version. It is the same situation there to. |
Modified by: @dyemanovdescription: Simplified test case: set planonly; select count(*) PLAN JOIN (X A ORDER RDB$PRIMARY4, Z NATURAL) vs select count(*) PLAN JOIN (X A ORDER RDB$PRIMARY4, Z INDEX ()) i.e. order of expressions in the join condition affects the generated plan and thus performance. => Simplified test case: recreate table t (id int primary key); select count(*) PLAN JOIN (X A ORDER RDB$PRIMARY4, Z NATURAL) vs select count(*) PLAN JOIN (X A ORDER RDB$PRIMARY4, Z INDEX ()) i.e. order of expressions in the join condition affects the generated plan and thus performance. |
Commented by: @dyemanov Most probably, there will be no 2.1.x releases anymore, so it's out of question. |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 1 [ 10332 ] Fix Version: 2.5.4 [ 10585 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] |
Submitted by: @pavel-zotov
Is related to CORE1295
Is related to QA612
Simplified test case:
recreate table t (id int primary key);
commit;
set planonly;
select count(*)
from (select id, rdb$db_key k from t a order by id) x
left join t z on x.k = z.rdb$db_key -- (*)
PLAN JOIN (X A ORDER RDB$PRIMARY4, Z NATURAL)
vs
select count(*)
from (select id, rdb$db_key k from t a order by id) x
left join t z on z.rdb$db_key = x.k -- (*)
PLAN JOIN (X A ORDER RDB$PRIMARY4, Z INDEX ())
i.e. order of expressions in the join condition affects the generated plan and thus performance.
Commits: 76c9ea1 182390b FirebirdSQL/fbt-repository@85c003c FirebirdSQL/fbt-repository@5dade31
====== Test Details ======
See also: CORE4038, CORE4492
The text was updated successfully, but these errors were encountered: