Subject Computed index
Author Tim Ward
I've got a query containing

... WHERE ... (MYFIELD in (1,3,4,5,7,8,9,11,12,13))

which runs horribly slowly, because (quite reasonably) the query
optimiser gives up on that, even though it's got an index on MYFIELD.

So, I thought, what about a computed index, as in:

CREATE ASC INDEX xxx ON MYTABLE COMPUTED BY (MYFIELD in
(1,3,4,5,7,8,9,11,12,13))

but trying to create that index gives

Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, column <nn>
in
while executing:
CREATE ASC INDEX xxx ON MYTABLE COMPUTED BY (MYFIELD in
(1,3,4,5,7,8,9,11,12,13))

I can find nothing in the Firebird book, or anywhere else, suggesting
that "in" is not allowed in the expression for a computed index.

Any suggestions?

--
Tim Ward