So I tried: ij> select * from ducc.Job where id < 117000 order by stateIndex asc, id desc;
You're right; the ORDER BY has to be the final clause, not before the WHERE. Thanks for correcting that.
And I see this query plan:
OK, I'm afraid I've forgotten the overall context. This query plan looks just like the previous query plan, and in both cases they appear to be using the index to restrict the number of rows searched. Are the queries that we're discussing here running slowly for you? According to the query plan, they're running quite efficiently. thanks, bryan
