db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: slow query? (from a practical newbie)
Date Tue, 07 Jan 2014 15:16:13 GMT
> 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


Mime
View raw message