DB_KEY based join of two tables may be ineffective --------------------------------------------------
Key: CORE-4530 URL: http://tracker.firebirdsql.org/browse/CORE-4530 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 2.5.3, 3.0 Alpha 2 Reporter: Dmitry Yemanov Simplified test case: set planonly; recreate table t (id int primary key); commit; 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel