Index process in Firebird2.1
Posted: 19.10.2017, 10:36
Hi!
I'm going to develop a commercial program with Zeos6.6.6 and Firebird2.1, in Delphi7.
I want to know whether the following index is picked by the optimizer.
[The first question]
CREATE INDEX IDX1 ON PROJECT(A)
CREATE INDEX IDX2 ON PROJECT(B)
CREATE INDEX IDX3 ON PROJECT(C)
CREATE INDEX IDX4 ON PROJECT(D)
SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
The optimizer would be choose the fastest way among table-full-scan and four indexs. Is this right?
[The second question]
CREATE INDEX IDX1 ON PROJECT(A)
CREATE INDEX IDX2 ON PROJECT(B,C,D)
SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
The optimizer would be choose the fastest way among table-full-scan and two indexs. Is this right?
[The third question]
CREATE INDEX IDX ON PROJECT(B,C,D)
SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
The optimizer would be choose the fastest way among table-full-scan and IDX index. Is this right?
please tell me.
Thanks!
I'm going to develop a commercial program with Zeos6.6.6 and Firebird2.1, in Delphi7.
I want to know whether the following index is picked by the optimizer.
[The first question]
CREATE INDEX IDX1 ON PROJECT(A)
CREATE INDEX IDX2 ON PROJECT(B)
CREATE INDEX IDX3 ON PROJECT(C)
CREATE INDEX IDX4 ON PROJECT(D)
SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
The optimizer would be choose the fastest way among table-full-scan and four indexs. Is this right?
[The second question]
CREATE INDEX IDX1 ON PROJECT(A)
CREATE INDEX IDX2 ON PROJECT(B,C,D)
SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
The optimizer would be choose the fastest way among table-full-scan and two indexs. Is this right?
[The third question]
CREATE INDEX IDX ON PROJECT(B,C,D)
SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
The optimizer would be choose the fastest way among table-full-scan and IDX index. Is this right?
please tell me.
Thanks!