Index process in Firebird2.1

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

elechos
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 16.05.2014, 05:38

Index process in Firebird2.1

Postby elechos » 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!

marsupilami
Gold Boarder
Gold Boarder
Posts: 671
Joined: 17.01.2011, 14:17

Re: Index process in Firebird2.1

Postby marsupilami » 19.10.2017, 16:16

Hello elechos,

Zeos 6.6 is not supported anymore. Please use Zeos 7.1 or even better Zeos 7.2 from SVN. Both have several improvements for Firebird and are compatible with Delphi 7.

Regarding your question about Indices: Zeos deosn't decide about which Indices get used by the optimizer. Please ask that question on the firebird-support mailing list.

With best regards,

Jan


Return to “6.6 - stable”

Who is online

Users browsing this forum: No registered users and 1 guest