On Sat, Dec 10, 2016 at 12:37 AM, Louis Kleiman lkleiman@sstms.com [firebird-support] <firebird-support@yahoogroups.com> wrote:
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 luigisic@tiscalinet.it [firebird-support] <firebird-support@yahoogroups.com > wrote:Il 09/12/2016 15.47, Mark Rotteveel mark@lawinegevaar.nl [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'"?
DT.DATA <= '31.12.2016' /* date format dd.mm.yyyy */
could be ignoring the hours part ie from '31.12.2016, 00:00:00.001' to '31.12.2016, 23:59:59.999'
better use
DT.DATA < '1.1.2017'
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 --------------------------
__._,_.___
Posted by: LtColRDSChauhan <rdsc1964@gmail.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.
__,_._,___
No comments:
Post a Comment