Ann Harrison <a...@qbeast.net> писал(а) в своём письме Mon, 06 Jan 2014  
20:38:32 +0400:

> The FIRST keyword was added to Firebird's SQL in version 1.0 or 1.1 -
> in 2000 0r 2001, but the use of FIRST in InterBase goes back much  
> further.
> It was part of GDML - and it's purpose was to signal that the query  
> should
> be optimized to walk the index (navigate, in the internals) rather than
> create
> a bitmap and access records in storage order.   There's no reason to  
> limit
> the number of record a query returns - when you've seen enough, just  
> close
> itt.  The semantic significance of FIRST and its relatives is "I want the
> first
> records quickly."
> So, historically, no, it's neither a workaround nor a hack.  Parsing SQL
> comments ... that sounds like a hack to me.  Adding yet another
> non-standard keyword when one already exists and does what you want
> doesn't appeal all that much either.

Analysis of comments and its impact on the plan really looks like the  
hacker way. Enter a keyword for a custom optimizer hints needed in any  
case. No matter how clever the optimizer it can still be wrong (and it is  
not only the choice of strategies FIRST / ALL ROWS). Tips exist in one  
form or another in many RDBMS (Oracle, MS SQL, DB2 ...)


-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/


------------------------------------------------------------------------------
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

Reply via email to