Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index for integer column cannot be used when INT128/DECFLOAT value is being searched #7727

Closed
simeonbodurov opened this issue Aug 28, 2023 · 0 comments

Comments

@simeonbodurov
Copy link

Test case:

CREATE TABLE TEST_A (
A BIGINT NOT NULL,
CONSTRAINT PK_TEST PRIMARY KEY(A)
);

CREATE TABLE TEST_B (
B BIGINT NOT NULL,
CONSTRAINT PK_TEST_B PRIMARY KEY(B)
);

SELECT ta.A, tb.B
FROM TEST_A ta
LEFT JOIN TEST_B tb ON tb.B = ta.A / 1000

On Firebird 3.0.10 the plan is: PLAN JOIN (TA NATURAL, TB INDEX (PK_TEST_B)) - TEST_B is read with index

On Firebird 4.0.3 the plan is: PLAN JOIN (TA NATURAL, TB NATURAL) - TEST_B is read is NATURAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment