Generate and look at the query plan, then run the query and look at the 
statistics.

It would be a clever optimiser that would have specific code to analyse

     EXTRACT (YEAR FROM DT.DATA) <= 2016

and work out that it could use an index (rather than just saying "oh, 
the stuff to the left of the <= is just a general expression, so I'll 
have to calculate it for every record"), whereas

     DT.DATA <= '12/31/2016'

needs no such cleverness. One might therefore reasonable expect that, 
using *any* RDBMS, the first approach is rather more likely to end up as 
a table scan.

But if you really want to know, generate and look at the query plan and 
statistics, on a table with realistic data and production indexes.

On 09/12/2016 11:35, Luigi Siciliano [email protected] 
[firebird-support] wrote:
> Hallo,
>
>     what is more performant from subject?
>
> I would prepare myself for a table that grows rapidly.
>
> Is the same in FB 2.5.6 or 3.0.1?
>
> Thanks


-- 
Tim Ward



------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Reply via email to