|
My mistake.
It should be RC2. Look at build number. Yes in 2.5 it works fine. Look at where clause, it contains all fields from foreign key . but optymizer ignores where clause and chooses index for order. Regards Ryszard First of all, the WHERE clause is not ignored. Primary key index is used for both filtering (IA = 1) and ordering (ORDER BY ID). Prior FB versions could never do such a trick. The problem you experience is that the condition IA = 1 seems to be not selective but the overall condition on {IA, DT, IT} fields is much more selective, so the plan SORT (TEST1 INDEX (FK_TEST2)) should be better. So it's not a bug but rather a downside of some other improvement - somebody wins, somebody loses. I will check whether the logic could be adjusted to cover all cases at once.
Dmitry Yemanov made changes - 10/Jan/16 10:38 AM
Dmitry Yemanov made changes - 10/Jan/16 10:41 AM
Dmitry Yemanov made changes - 12/Feb/17 04:24 PM
Dmitry Yemanov made changes - 20/Nov/18 04:43 PM
Dmitry Yemanov made changes - 20/Nov/18 06:20 PM
Pavel Zotov made changes - 09/Dec/18 01:56 PM
Pavel Zotov made changes - 09/Dec/18 01:56 PM
|
Then, if you think this plan is wrong then what you consider being the correct plan? Does any prior FB version works with a better plan?