Issue Details (XML | Word | Printable)

Key: CORE-5070
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Ryszard Skotarski
Votes: 1
Watchers: 3
Operations

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

Compound index cannot be used for filtering in some ORDER/GROUP BY queries

Created: 08/Jan/16 11:25 AM   Updated: 09/Dec/18 01:56 PM
Component/s: Engine
Affects Version/s: 3.0 RC1
Fix Version/s: 4.0 Beta 1, 3.0.5

Environment: W10 x64 FB3 build 32268
Issue Links:
Relate
 

QA Status: Done successfully


 Description  « Hide
create table test1 (ia integer not null,id integer not null, it integer not null, dt date not null, primary key (ia,id));
create table test2 (ia integer not null, it integer not null, dt date not null, primary key (ia,dt,it));
alter table test1 add CONSTRAINT fk_test2 FOREIGN key (ia,dt,it) REFERENCES test2 (ia,dt,it)

select * from test1
where ia=1 and dt='01/01/2015' and it=1
order by id;
plan : PLAN (TEST1 ORDER RDB$PRIMARY249)
performance very poor
the same problem with :
select id from test1
where ia=1 and dt='01/01/2015' and it=1
group by id

where without order or group works fine

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.