Wrong Plan Used ---------------- Key: CORE-5070 URL: http://tracker.firebirdsql.org/browse/CORE-5070 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0 Beta 2 Environment: W10 x64 FB3 build 32268 Reporter: Ryszard Skotarski
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 -- 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 ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel