Subject Computed Index for Integer-Fields and "STARTING WITH" clause
Author Christian Kusenbach
Hi,

I have a question about computed indices related to integer fields.

In my program there are several selects on integer-fields with a STARTING WITH clause.

Firebird internally converts the integer value to a string and then filters the value.
It would be great if I could create a computed index on that (internal) string so FB does an index-lookup for the data.

I tried to create an computed index on a table with the expression "CAST(MY_INT_FIELD AS VARCHAR(11))" cause I think firebird internally uses a VARCHAR(11) or CHAR(11) value but that doesn't solve the problem.

Any idea on how to get this working without changing every select in the program?

Thanks and best regards!
Christian