Issue Details (XML | Word | Printable)

Key: CORE-3997
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Dmitry Yemanov
Reporter: Dimitry Sibiryakov
Votes: 0
Watchers: 0

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

Join using RDB$DB_KEY produce NATURAL plan

Created: 26/Nov/12 11:01 AM   Updated: 23/Oct/16 02:51 PM
Component/s: Engine
Affects Version/s: 2.5.1
Fix Version/s: None

Issue Links:

QA Status: Done successfully

 Description  « Hide
Following script shows plan JOIN (T_KEY NATURAL, T NATURAL) instead of JOIN (T_KEY NATURAL, T INDEX())

create table t (f integer);
create table t_key (k char(8) character set octets);
set term ^;
execute block as
declare variable i integer=100000;
 While (i>0) do
   insert into t values (:i);
   i = i-1;
set term ;^
insert into t_key select rdb$db_key from t where f=1;
set plan on;
select f from t join t_key on t.rdb$db_key=t_key.k;

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 27/Nov/12 05:17 PM
I'm closing it in favor of a more generic CORE-1295 which will be backported into v2.5.3.