Closed ant-zuev closed 1 year ago
I have to object to that. According to this: https://github.com/FirebirdSQL/firebird/issues/3810#issuecomment-826221325 (" the other index (tmp_tbl1_fld2) should not be considered") -- the fix exactly referred to the case when this extra index exists in the database. So, if we remove it then optimizer will just have no choose and plan always will be the same.
Pavel, the real fix for this issue has been committed by Vlad after my comment. And it improves lookup inside a compound index. So it's OK to test fetches with and without fix, but only for the compound index. This makes the second (single-segment) index redundant for this test.
OK, i will change this test.
But i have one more Q. Does it make sense to remove this index and add another one, compound for the same columns but DESCENDING, to check that when it is used then we have same fetches ?
Test updated. Issue can be closed.
OK, i will change this test.
But i have one more Q. Does it make sense to remove this index and add another one, compound for the same columns but DESCENDING, to check that when it is used then we have same fetches ?
Feel free. AFAIR, descending indices don't have this bug, so both could be tested to deliver the same performance. However, size of both indices could be different and thus number of fetches could also be different.
Remove an index tmp_tbl1_fld2 from the test. The index does not refer to the fix, while the optimizer may produce a plan different from the expected one.