Issue Details (XML | Word | Printable)

Key: CORE-1173
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Dmitry Yemanov
Reporter: Karel Rys
Votes: 2
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Expression index based on computed fields

Created: 18/Mar/07 08:24 PM   Updated: 25/Sep/15 01:02 PM
Component/s: Engine
Affects Version/s: 2.0.1
Fix Version/s: 2.5.4

Environment: FB 2.0.1.12855, Windows XP Home
Issue Links:
Relate

QA Status: Done successfully


 Description  « Hide
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

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 12/May/15 07:45 PM
v2.5.4 has it fixed, hence I'm closing the ticket.