You can create an expression index on EXTRACT (YEAR FROM DT.DATA) to get performance improvements in your first expression, but an index on plain ol' DT.DATA would be more flexible -- it would provide assistance in more cases than the expression index. The plain ol' column index would speed up the DT.DATA <= '12/31/2016', but not the EXTRACT... expression.
As always in our business, tradeoffs... On Fri, Dec 9, 2016 at 12:12 PM Luigi Siciliano [email protected] [firebird-support] <[email protected]> wrote: > Il 09/12/2016 15.47, Mark Rotteveel [email protected] > [firebird-support] ha scritto: > > > > Could you please put all pertinent information of your question in the > body, and not only in the subject. It makes questions a lot easier to > read (especially on mobile devices). > > I'm sorry, I rewrite the question: > > what is more performant: "EXTRACT (YEAR FROM DT.DATA) <= 2016" or > "DT.DATA <= '12/31/2016'"? > > I would prepare myself for a table that grows rapidly. > > Is the same in FB 2.5.6 or 3.0.1? > > Thanks > -- > > Luigi Siciliano > -------------------------- > > >
