Auser99 <[email protected]> writes:
>> In Derby, when user Select ... where ... IN (Select ... ), it runs >> extremely >> slow, even though both selects are have optimized indeces (the primary >> keys). Can someone suggest a get-around rather than run the queries one >> at a >> time? Thanks. > It's difficult to say without seeing the exact query, but sometimes it > may be faster to write the query as a join instead of using an IN > subquery. In many cases Derby is able to rewrite the query for you (see > [1] and [2]), but it doesn't always detect that there is an equivalent > join. > [1] http://db.apache.org/derby/docs/10.5/tuning/ctuntransform36368.html > [2] http://db.apache.org/derby/docs/10.5/tuning/ctuntransform25868.html Thanks. I'll give it a try. http://www.xprad.org/ gu -- View this message in context: http://old.nabble.com/Select-...-where-...-IN-%28Select--...-%29-tp27631171p27634393.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
