Subject AW: [firebird-support] Optimization Question
Author Thomas von Stetten
Hi,

> select first 1 SpreadAction_ID from SpreadActionTable
> where Spread_ID = 9007 AND ( Status IS NULL OR Status != 2 )
> AND Action_Time >= 1073030400
> AND Action_Time <= 1075535999
> Order By Action_Time;

if you only want to know, if there is any record, then drop the order by
part
else try "order by Spread_ID, Action_Time" (that's like your SPREADID_INDEX)

HTH
Thomas