You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE Test (
Kod integer not null,
DatumZacatek date NOT NULL,
CasZacatek time NOT NULL,
Zacatek COMPUTED BY (DatumZacatek+CasZacatek),
CONSTRAINT Test_Key PRIMARY KEY (Kod)
);
it is possible to create computed index based on a computed field:
CREATE INDEX Test1 ON Test COMPUTED BY (Zacatek);
However, thie index is not used in SELECT * from test where zacatek>'now';
When I create the computed index this way:
CREATE INDEX Test2 ON Test COMPUTED BY (DatumZacatek+CasZacatek);
such index is used for SELECT * from test where zacatek>'now';
I think it should not be possible to create a computed index based on a computed field at all, or both my examples should work the same.
Kind regards,
Karel Rys
The text was updated successfully, but these errors were encountered:
Submitted by: Karel Rys (vandrovnik)
Relate to CORE1212
Is related to QA601
Votes: 2
Having this table:
CREATE TABLE Test (
Kod integer not null,
DatumZacatek date NOT NULL,
CasZacatek time NOT NULL,
Zacatek COMPUTED BY (DatumZacatek+CasZacatek),
CONSTRAINT Test_Key PRIMARY KEY (Kod)
);
it is possible to create computed index based on a computed field:
CREATE INDEX Test1 ON Test COMPUTED BY (Zacatek);
However, thie index is not used in SELECT * from test where zacatek>'now';
When I create the computed index this way:
CREATE INDEX Test2 ON Test COMPUTED BY (DatumZacatek+CasZacatek);
such index is used for SELECT * from test where zacatek>'now';
I think it should not be possible to create a computed index based on a computed field at all, or both my examples should work the same.
Kind regards,
Karel Rys
The text was updated successfully, but these errors were encountered: