Subject Re: [firebird-support] How to optimize queries on field state
Author Thomas Steinmaurer
> I have a state machine (workflow) implemented on a table a couple of
> million records and growing.
> I have crated an index on the "state" field. The possible states are
> very few (5 to 10). Obviously selectivity index is terrible. As I can
> optimize the query?

Hard to say without seeing an actual query ...

Is the state field the only one used to filter the result set?

With regards,
Thomas Steinmaurer

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.