Ann, > Right. And if you want to give the optimizer a hint that it should choose > the second plan, change the query like this: > > select first 1000000 * from MOVIES where COMMENTS like '%yacht% order > by NAME; > > If you think your client may want more than a million rows, increase > that number.
I mentioned this approach in my initial message and it does not look good to me. I treat it as a workaround / hack, not a solution. Of course, we could improve it via some syntax sugar e.g. "select first *" (without row counter) or "select first unlimited *", but it still doesn't look really elegant. Also, there may be (in fact, there are) customers who need the FIRST ROWS strategy being the default one. And rewriting a majority of their queries to include the dummy FIRST clause is not something they can consider seriously. Dmitry ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel