Subject Re: [firebird-support] "EXTRACT (YEAR FROM DT.DATA) <= 2016" or "DT.DATA <= '12/31/2016'"
Author
--------------------------------------------
On Fri, 12/9/16, LtColRDSChauhan rdsc1964@... [firebird-support] <firebird-support@yahoogroups.com> wrote:


Subject: Re: [firebird-support] "EXTRACT (YEAR FROM DT.DATA) <= 2016" or "DT.DATA <= '12/31/2016'"
To: firebird-support@yahoogroups.com
Date: Friday, December 9, 2016, 10:45 PM


 











On Sat, Dec 10, 2016 at
12:37 AM, Louis Kleiman lkleiman@...
[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@...
[firebird-support] <firebird-support@yahoogroups.
com> wrote:



Il 09/12/2016 15.47, Mark Rotteveel mark@...
[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 useDT.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
--------------------------
















































--
  Regards,
  Lt Col (Retd) Rajiv D.S. Chauhan  in.linkedin.com/in/ltcolrdschauhan












#yiv8735555655 #yiv8735555655 --
#yiv8735555655ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}

#yiv8735555655 #yiv8735555655ygrp-mkp hr {
border:1px solid #d8d8d8;}

#yiv8735555655 #yiv8735555655ygrp-mkp #yiv8735555655hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}

#yiv8735555655 #yiv8735555655ygrp-mkp #yiv8735555655ads {
margin-bottom:10px;}

#yiv8735555655 #yiv8735555655ygrp-mkp .yiv8735555655ad {
padding:0 0;}

#yiv8735555655 #yiv8735555655ygrp-mkp .yiv8735555655ad p {
margin:0;}

#yiv8735555655 #yiv8735555655ygrp-mkp .yiv8735555655ad a {
color:#0000ff;text-decoration:none;}
#yiv8735555655 #yiv8735555655ygrp-sponsor
#yiv8735555655ygrp-lc {
font-family:Arial;}

#yiv8735555655 #yiv8735555655ygrp-sponsor
#yiv8735555655ygrp-lc #yiv8735555655hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}

#yiv8735555655 #yiv8735555655ygrp-sponsor
#yiv8735555655ygrp-lc .yiv8735555655ad {
margin-bottom:10px;padding:0 0;}

#yiv8735555655 #yiv8735555655actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#yiv8735555655 #yiv8735555655activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#yiv8735555655 #yiv8735555655activity span {
font-weight:700;}

#yiv8735555655 #yiv8735555655activity span:first-child {
text-transform:uppercase;}

#yiv8735555655 #yiv8735555655activity span a {
color:#5085b6;text-decoration:none;}

#yiv8735555655 #yiv8735555655activity span span {
color:#ff7900;}

#yiv8735555655 #yiv8735555655activity span
.yiv8735555655underline {
text-decoration:underline;}

#yiv8735555655 .yiv8735555655attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}

#yiv8735555655 .yiv8735555655attach div a {
text-decoration:none;}

#yiv8735555655 .yiv8735555655attach img {
border:none;padding-right:5px;}

#yiv8735555655 .yiv8735555655attach label {
display:block;margin-bottom:5px;}

#yiv8735555655 .yiv8735555655attach label a {
text-decoration:none;}

#yiv8735555655 blockquote {
margin:0 0 0 4px;}

#yiv8735555655 .yiv8735555655bold {
font-family:Arial;font-size:13px;font-weight:700;}

#yiv8735555655 .yiv8735555655bold a {
text-decoration:none;}

#yiv8735555655 dd.yiv8735555655last p a {
font-family:Verdana;font-weight:700;}

#yiv8735555655 dd.yiv8735555655last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#yiv8735555655 dd.yiv8735555655last p
span.yiv8735555655yshortcuts {
margin-right:0;}

#yiv8735555655 div.yiv8735555655attach-table div div a {
text-decoration:none;}

#yiv8735555655 div.yiv8735555655attach-table {
width:400px;}


#yiv8735555655 div.yiv8735555655file-title a, #yiv8735555655
div.yiv8735555655file-title a:active, #yiv8735555655
div.yiv8735555655file-title a:hover, #yiv8735555655
div.yiv8735555655file-title a:visited {
text-decoration:none;}

#yiv8735555655 div.yiv8735555655photo-title a,
#yiv8735555655 div.yiv8735555655photo-title a:active,
#yiv8735555655 div.yiv8735555655photo-title a:hover,
#yiv8735555655 div.yiv8735555655photo-title a:visited {
text-decoration:none;}

#yiv8735555655 div#yiv8735555655ygrp-mlmsg
#yiv8735555655ygrp-msg p a span.yiv8735555655yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#yiv8735555655 .yiv8735555655green {
color:#628c2a;}

#yiv8735555655 .yiv8735555655MsoNormal {
margin:0 0 0 0;}

#yiv8735555655 o {
font-size:0;}

#yiv8735555655 #yiv8735555655photos div {
float:left;width:72px;}

#yiv8735555655 #yiv8735555655photos div div {
border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}

#yiv8735555655 #yiv8735555655photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#yiv8735555655 #yiv8735555655reco-category {
font-size:77%;}

#yiv8735555655 #yiv8735555655reco-desc {
font-size:77%;}

#yiv8735555655 .yiv8735555655replbq {
margin:4px;}

#yiv8735555655 #yiv8735555655ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#yiv8735555655 #yiv8735555655ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}

#yiv8735555655 #yiv8735555655ygrp-mlmsg table {
font-size:inherit;font:100%;}

#yiv8735555655 #yiv8735555655ygrp-mlmsg select,
#yiv8735555655 input, #yiv8735555655 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#yiv8735555655 #yiv8735555655ygrp-mlmsg pre, #yiv8735555655
code {
font:115% monospace;}

#yiv8735555655 #yiv8735555655ygrp-mlmsg * {
line-height:1.22em;}

#yiv8735555655 #yiv8735555655ygrp-mlmsg #yiv8735555655logo {
padding-bottom:10px;}


#yiv8735555655 #yiv8735555655ygrp-msg p a {
font-family:Verdana;}

#yiv8735555655 #yiv8735555655ygrp-msg
p#yiv8735555655attach-count span {
color:#1E66AE;font-weight:700;}

#yiv8735555655 #yiv8735555655ygrp-reco
#yiv8735555655reco-head {
color:#ff7900;font-weight:700;}

#yiv8735555655 #yiv8735555655ygrp-reco {
margin-bottom:20px;padding:0px;}

#yiv8735555655 #yiv8735555655ygrp-sponsor #yiv8735555655ov
li a {
font-size:130%;text-decoration:none;}

#yiv8735555655 #yiv8735555655ygrp-sponsor #yiv8735555655ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}

#yiv8735555655 #yiv8735555655ygrp-sponsor #yiv8735555655ov
ul {
margin:0;padding:0 0 0 8px;}

#yiv8735555655 #yiv8735555655ygrp-text {
font-family:Georgia;}

#yiv8735555655 #yiv8735555655ygrp-text p {
margin:0 0 1em 0;}

#yiv8735555655 #yiv8735555655ygrp-text tt {
font-size:120%;}

#yiv8735555655 #yiv8735555655ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv8735555655
an. - Nicolae Balcescu intemeiaza la Londra un Comitet Revolutionar international la 5 17 ian. - se intalneste cu lordul Pal-merston si ii prezinta un memoriu in care se solicita evacuarea trupelor ruso-oto-mane de ocupatie si amnistie pentru revolutionarii exilati. 3 iul. - Apare la lasi publicatia Zimbrul iar la 8 20 septembrie la Paris revista Romania viitoare . 12 dec. - Cancelaria imperiala de la Viena ridica Episcopia de la Blaj la rang de Mitropolie.18501 oct. - Instituirea teritoriului vamal unic a Imperiului Habsburgic. 29 nov. - Prusia accepta refacerea Confederatiei germane acordul austro-prusian de la Olmiitz .