03.06.2020 20:29, Adriano dos Santos Fernandes wrote:
I ran Mark's test for CORE-6322 (and variant with index) and TCS. Would like to have the full test suite ran on it too. In the first commit there is only the necessary changes (and would be backported to v3 if approved). The second commit refactors req_null as a nice to have and is not for v3. I suppose it now give correct results and still use indexes when possible (thanks ConditionalStream).
Unfortunately, not exactly so. ConditionalStream is good only when choice is between NATURAL and INDEX plans. It cannot be used when choosing between good and bad index matches.
Currently, your PR shows a regression for CORE-5236, subquery uses another index (single-segment) while it used both segments of the composite index before. I.e. injected ORs prevent good index matching.
I suppose we can make ConditionalStream usage more generic and I'm willing to estimate the required efforts, but don't expect it to happen very soon.
On the positive side, I see not other regressions (at least in the fbtest suite).
Dmitry Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel