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
Operations

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: 28/Nov/12 09:42 AM
Component/s: Engine
Affects Version/s: 2.5.1
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Duplicate
 

Planning Status: Unspecified


 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);
commit;
set term ^;
execute block as
declare variable i integer=100000;
begin
 While (i>0) do
  begin
   insert into t values (:i);
   i = i-1;
  end
end^
set term ;^
commit;
insert into t_key select rdb$db_key from t where f=1;
commit;
set plan on;
select f from t join t_key on t.rdb$db_key=t_key.k;

 All   Comments   Work Log   Change History   Version Control   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.