diff --git a/sql/core/benchmarks/DateTimeBenchmark-results.txt b/sql/core/benchmarks/DateTimeBenchmark-results.txt index 7586295778bd..9e3f1fda4008 100644 --- a/sql/core/benchmarks/DateTimeBenchmark-results.txt +++ b/sql/core/benchmarks/DateTimeBenchmark-results.txt @@ -6,18 +6,18 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz datetime +/- interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date + interval(m) 1638 1701 89 6.1 163.8 1.0X -date + interval(m, d) 1785 1790 7 5.6 178.5 0.9X -date + interval(m, d, ms) 6229 6270 58 1.6 622.9 0.3X -date - interval(m) 1500 1503 4 6.7 150.0 1.1X -date - interval(m, d) 1764 1766 3 5.7 176.4 0.9X -date - interval(m, d, ms) 6428 6446 25 1.6 642.8 0.3X -timestamp + interval(m) 2719 2722 4 3.7 271.9 0.6X -timestamp + interval(m, d) 3011 3021 14 3.3 301.1 0.5X -timestamp + interval(m, d, ms) 3405 3412 9 2.9 340.5 0.5X -timestamp - interval(m) 2759 2764 7 3.6 275.9 0.6X -timestamp - interval(m, d) 3094 3112 25 3.2 309.4 0.5X -timestamp - interval(m, d, ms) 3388 3392 5 3.0 338.8 0.5X +date + interval(m) 1557 1616 83 6.4 155.7 1.0X +date + interval(m, d) 1772 1786 20 5.6 177.2 0.9X +date + interval(m, d, ms) 6122 6136 20 1.6 612.2 0.3X +date - interval(m) 1467 1471 6 6.8 146.7 1.1X +date - interval(m, d) 1729 1735 9 5.8 172.9 0.9X +date - interval(m, d, ms) 6271 6306 49 1.6 627.1 0.2X +timestamp + interval(m) 3282 3392 155 3.0 328.2 0.5X +timestamp + interval(m, d) 3630 3635 7 2.8 363.0 0.4X +timestamp + interval(m, d, ms) 3987 3989 3 2.5 398.7 0.4X +timestamp - interval(m) 3278 3280 3 3.1 327.8 0.5X +timestamp - interval(m, d) 3643 3647 6 2.7 364.3 0.4X +timestamp - interval(m, d, ms) 3962 3963 2 2.5 396.2 0.4X ================================================================================================ @@ -28,92 +28,92 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz cast to timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to timestamp wholestage off 319 323 6 31.4 31.9 1.0X -cast to timestamp wholestage on 304 311 8 32.9 30.4 1.0X +cast to timestamp wholestage off 320 322 2 31.2 32.0 1.0X +cast to timestamp wholestage on 295 306 19 33.8 29.5 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz year of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -year of timestamp wholestage off 1234 1239 6 8.1 123.4 1.0X -year of timestamp wholestage on 1229 1244 22 8.1 122.9 1.0X +year of timestamp wholestage off 1211 1218 9 8.3 121.1 1.0X +year of timestamp wholestage on 1202 1210 6 8.3 120.2 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz quarter of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -quarter of timestamp wholestage off 1440 1445 7 6.9 144.0 1.0X -quarter of timestamp wholestage on 1358 1361 3 7.4 135.8 1.1X +quarter of timestamp wholestage off 1420 1420 0 7.0 142.0 1.0X +quarter of timestamp wholestage on 1341 1346 4 7.5 134.1 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz month of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -month of timestamp wholestage off 1239 1240 1 8.1 123.9 1.0X -month of timestamp wholestage on 1221 1239 26 8.2 122.1 1.0X +month of timestamp wholestage off 1225 1235 14 8.2 122.5 1.0X +month of timestamp wholestage on 1194 1202 10 8.4 119.4 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz weekofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekofyear of timestamp wholestage off 1926 1934 11 5.2 192.6 1.0X -weekofyear of timestamp wholestage on 1901 1911 10 5.3 190.1 1.0X +weekofyear of timestamp wholestage off 1814 1814 1 5.5 181.4 1.0X +weekofyear of timestamp wholestage on 1827 1839 11 5.5 182.7 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz day of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -day of timestamp wholestage off 1225 1229 6 8.2 122.5 1.0X -day of timestamp wholestage on 1217 1225 7 8.2 121.7 1.0X +day of timestamp wholestage off 1210 1212 4 8.3 121.0 1.0X +day of timestamp wholestage on 1189 1192 3 8.4 118.9 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz dayofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofyear of timestamp wholestage off 1290 1295 7 7.8 129.0 1.0X -dayofyear of timestamp wholestage on 1262 1270 7 7.9 126.2 1.0X +dayofyear of timestamp wholestage off 1270 1275 8 7.9 127.0 1.0X +dayofyear of timestamp wholestage on 1238 1245 8 8.1 123.8 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz dayofmonth of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofmonth of timestamp wholestage off 1239 1239 1 8.1 123.9 1.0X -dayofmonth of timestamp wholestage on 1215 1222 8 8.2 121.5 1.0X +dayofmonth of timestamp wholestage off 1227 1229 3 8.2 122.7 1.0X +dayofmonth of timestamp wholestage on 1191 1196 6 8.4 119.1 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz dayofweek of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofweek of timestamp wholestage off 1421 1422 2 7.0 142.1 1.0X -dayofweek of timestamp wholestage on 1379 1388 8 7.3 137.9 1.0X +dayofweek of timestamp wholestage off 1399 1404 7 7.1 139.9 1.0X +dayofweek of timestamp wholestage on 1353 1360 11 7.4 135.3 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz weekday of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekday of timestamp wholestage off 1349 1351 2 7.4 134.9 1.0X -weekday of timestamp wholestage on 1320 1327 8 7.6 132.0 1.0X +weekday of timestamp wholestage off 1341 1341 0 7.5 134.1 1.0X +weekday of timestamp wholestage on 1290 1293 3 7.8 129.0 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz hour of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -hour of timestamp wholestage off 1024 1024 0 9.8 102.4 1.0X -hour of timestamp wholestage on 921 929 11 10.9 92.1 1.1X +hour of timestamp wholestage off 1008 1008 0 9.9 100.8 1.0X +hour of timestamp wholestage on 931 938 6 10.7 93.1 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz minute of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -minute of timestamp wholestage off 977 982 6 10.2 97.7 1.0X -minute of timestamp wholestage on 927 929 2 10.8 92.7 1.1X +minute of timestamp wholestage off 1016 1019 4 9.8 101.6 1.0X +minute of timestamp wholestage on 933 935 2 10.7 93.3 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz second of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -second of timestamp wholestage off 987 989 3 10.1 98.7 1.0X -second of timestamp wholestage on 923 926 5 10.8 92.3 1.1X +second of timestamp wholestage off 966 969 5 10.4 96.6 1.0X +second of timestamp wholestage on 932 938 8 10.7 93.2 1.0X ================================================================================================ @@ -124,15 +124,15 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz current_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_date wholestage off 303 311 12 33.0 30.3 1.0X -current_date wholestage on 266 271 5 37.5 26.6 1.1X +current_date wholestage off 292 293 1 34.2 29.2 1.0X +current_date wholestage on 267 273 6 37.5 26.7 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz current_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_timestamp wholestage off 297 297 1 33.7 29.7 1.0X -current_timestamp wholestage on 264 272 7 37.8 26.4 1.1X +current_timestamp wholestage off 285 308 32 35.1 28.5 1.0X +current_timestamp wholestage on 259 332 146 38.6 25.9 1.1X ================================================================================================ @@ -143,43 +143,43 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz cast to date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to date wholestage off 1062 1063 2 9.4 106.2 1.0X -cast to date wholestage on 1007 1021 20 9.9 100.7 1.1X +cast to date wholestage off 1038 1041 5 9.6 103.8 1.0X +cast to date wholestage on 985 1001 18 10.2 98.5 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz last_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -last_day wholestage off 1262 1265 5 7.9 126.2 1.0X -last_day wholestage on 1244 1256 14 8.0 124.4 1.0X +last_day wholestage off 1251 1252 1 8.0 125.1 1.0X +last_day wholestage on 1231 1238 9 8.1 123.1 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz next_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -next_day wholestage off 1119 1121 2 8.9 111.9 1.0X -next_day wholestage on 1057 1063 6 9.5 105.7 1.1X +next_day wholestage off 1109 1109 0 9.0 110.9 1.0X +next_day wholestage on 1033 1037 4 9.7 103.3 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_add: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_add wholestage off 1054 1059 7 9.5 105.4 1.0X -date_add wholestage on 1037 1069 52 9.6 103.7 1.0X +date_add wholestage off 1041 1044 4 9.6 104.1 1.0X +date_add wholestage on 1018 1023 7 9.8 101.8 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_sub: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_sub wholestage off 1054 1056 4 9.5 105.4 1.0X -date_sub wholestage on 1036 1040 4 9.7 103.6 1.0X +date_sub wholestage off 1042 1045 4 9.6 104.2 1.0X +date_sub wholestage on 1017 1020 5 9.8 101.7 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz add_months: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -add_months wholestage off 1408 1421 19 7.1 140.8 1.0X -add_months wholestage on 1434 1440 7 7.0 143.4 1.0X +add_months wholestage off 1390 1395 8 7.2 139.0 1.0X +add_months wholestage on 1376 1382 5 7.3 137.6 1.0X ================================================================================================ @@ -190,8 +190,8 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz format date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -format date wholestage off 5937 6169 328 1.7 593.7 1.0X -format date wholestage on 5836 5878 74 1.7 583.6 1.0X +format date wholestage off 5804 5884 114 1.7 580.4 1.0X +format date wholestage on 5800 5828 29 1.7 580.0 1.0X ================================================================================================ @@ -202,8 +202,8 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz from_unixtime: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_unixtime wholestage off 8904 8914 14 1.1 890.4 1.0X -from_unixtime wholestage on 8918 8936 13 1.1 891.8 1.0X +from_unixtime wholestage off 8528 8533 7 1.2 852.8 1.0X +from_unixtime wholestage on 8491 8502 8 1.2 849.1 1.0X ================================================================================================ @@ -214,15 +214,15 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz from_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_utc_timestamp wholestage off 1110 1112 3 9.0 111.0 1.0X -from_utc_timestamp wholestage on 1115 1119 3 9.0 111.5 1.0X +from_utc_timestamp wholestage off 1170 1172 2 8.5 117.0 1.0X +from_utc_timestamp wholestage on 1120 1127 5 8.9 112.0 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz to_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_utc_timestamp wholestage off 1524 1525 1 6.6 152.4 1.0X -to_utc_timestamp wholestage on 1450 1458 14 6.9 145.0 1.1X +to_utc_timestamp wholestage off 1716 1716 1 5.8 171.6 1.0X +to_utc_timestamp wholestage on 1661 1666 7 6.0 166.1 1.0X ================================================================================================ @@ -233,29 +233,29 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz cast interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast interval wholestage off 341 342 1 29.3 34.1 1.0X -cast interval wholestage on 285 294 7 35.1 28.5 1.2X +cast interval wholestage off 332 335 3 30.1 33.2 1.0X +cast interval wholestage on 280 286 7 35.7 28.0 1.2X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz datediff: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -datediff wholestage off 1874 1881 10 5.3 187.4 1.0X -datediff wholestage on 1785 1791 3 5.6 178.5 1.0X +datediff wholestage off 1818 1831 20 5.5 181.8 1.0X +datediff wholestage on 1731 1739 7 5.8 173.1 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz months_between: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -months_between wholestage off 5038 5042 5 2.0 503.8 1.0X -months_between wholestage on 4979 4987 8 2.0 497.9 1.0X +months_between wholestage off 5559 5567 11 1.8 555.9 1.0X +months_between wholestage on 5503 5507 3 1.8 550.3 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz window: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -window wholestage off 1716 1841 177 0.6 1716.2 1.0X -window wholestage on 46024 46063 27 0.0 46024.1 0.0X +window wholestage off 1767 1875 153 0.6 1767.2 1.0X +window wholestage on 45044 45063 12 0.0 45043.6 0.0X ================================================================================================ @@ -266,134 +266,134 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc YEAR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YEAR wholestage off 2428 2429 2 4.1 242.8 1.0X -date_trunc YEAR wholestage on 2451 2469 12 4.1 245.1 1.0X +date_trunc YEAR wholestage off 2787 2793 9 3.6 278.7 1.0X +date_trunc YEAR wholestage on 2677 2686 8 3.7 267.7 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc YYYY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YYYY wholestage off 2423 2426 3 4.1 242.3 1.0X -date_trunc YYYY wholestage on 2454 2462 8 4.1 245.4 1.0X +date_trunc YYYY wholestage off 2794 2795 1 3.6 279.4 1.0X +date_trunc YYYY wholestage on 2679 2695 14 3.7 267.9 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc YY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YY wholestage off 2421 2441 28 4.1 242.1 1.0X -date_trunc YY wholestage on 2453 2461 9 4.1 245.3 1.0X +date_trunc YY wholestage off 2779 2780 2 3.6 277.9 1.0X +date_trunc YY wholestage on 2677 2678 2 3.7 267.7 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc MON: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MON wholestage off 2425 2427 3 4.1 242.5 1.0X -date_trunc MON wholestage on 2431 2438 9 4.1 243.1 1.0X +date_trunc MON wholestage off 2722 2724 3 3.7 272.2 1.0X +date_trunc MON wholestage on 2697 2705 8 3.7 269.7 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc MONTH: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MONTH wholestage off 2427 2433 8 4.1 242.7 1.0X -date_trunc MONTH wholestage on 2429 2435 4 4.1 242.9 1.0X +date_trunc MONTH wholestage off 2733 2735 4 3.7 273.3 1.0X +date_trunc MONTH wholestage on 2703 2713 9 3.7 270.3 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc MM: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MM wholestage off 2425 2431 9 4.1 242.5 1.0X -date_trunc MM wholestage on 2430 2435 4 4.1 243.0 1.0X +date_trunc MM wholestage off 2728 2728 0 3.7 272.8 1.0X +date_trunc MM wholestage on 2703 2708 9 3.7 270.3 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc DAY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DAY wholestage off 2117 2119 4 4.7 211.7 1.0X -date_trunc DAY wholestage on 2036 2118 174 4.9 203.6 1.0X +date_trunc DAY wholestage off 2209 2215 8 4.5 220.9 1.0X +date_trunc DAY wholestage on 2198 2202 6 4.5 219.8 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc DD: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DD wholestage off 2116 2119 5 4.7 211.6 1.0X -date_trunc DD wholestage on 2035 2043 10 4.9 203.5 1.0X +date_trunc DD wholestage off 2208 2214 8 4.5 220.8 1.0X +date_trunc DD wholestage on 2194 2205 14 4.6 219.4 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc HOUR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc HOUR wholestage off 2013 2014 2 5.0 201.3 1.0X -date_trunc HOUR wholestage on 2077 2088 13 4.8 207.7 1.0X +date_trunc HOUR wholestage off 2228 2232 6 4.5 222.8 1.0X +date_trunc HOUR wholestage on 2194 2205 10 4.6 219.4 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc MINUTE: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MINUTE wholestage off 363 368 8 27.6 36.3 1.0X -date_trunc MINUTE wholestage on 321 326 7 31.2 32.1 1.1X +date_trunc MINUTE wholestage off 363 363 0 27.5 36.3 1.0X +date_trunc MINUTE wholestage on 330 333 4 30.3 33.0 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc SECOND: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc SECOND wholestage off 365 366 0 27.4 36.5 1.0X -date_trunc SECOND wholestage on 319 332 16 31.4 31.9 1.1X +date_trunc SECOND wholestage off 362 367 8 27.6 36.2 1.0X +date_trunc SECOND wholestage on 331 358 52 30.2 33.1 1.1X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc WEEK: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc WEEK wholestage off 2371 2376 7 4.2 237.1 1.0X -date_trunc WEEK wholestage on 2314 2322 8 4.3 231.4 1.0X +date_trunc WEEK wholestage off 2654 2667 18 3.8 265.4 1.0X +date_trunc WEEK wholestage on 2592 2602 8 3.9 259.2 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz date_trunc QUARTER: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc QUARTER wholestage off 3334 3335 1 3.0 333.4 1.0X -date_trunc QUARTER wholestage on 3286 3291 7 3.0 328.6 1.0X +date_trunc QUARTER wholestage off 3437 3441 6 2.9 343.7 1.0X +date_trunc QUARTER wholestage on 3411 3419 8 2.9 341.1 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz trunc year: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc year wholestage off 303 304 2 33.0 30.3 1.0X -trunc year wholestage on 283 291 5 35.3 28.3 1.1X +trunc year wholestage off 301 313 17 33.2 30.1 1.0X +trunc year wholestage on 305 312 12 32.8 30.5 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz trunc yyyy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yyyy wholestage off 324 330 8 30.9 32.4 1.0X -trunc yyyy wholestage on 283 291 9 35.3 28.3 1.1X +trunc yyyy wholestage off 303 305 2 33.0 30.3 1.0X +trunc yyyy wholestage on 299 307 6 33.5 29.9 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz trunc yy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yy wholestage off 304 305 3 32.9 30.4 1.0X -trunc yy wholestage on 283 302 28 35.3 28.3 1.1X +trunc yy wholestage off 302 302 0 33.1 30.2 1.0X +trunc yy wholestage on 304 312 7 32.9 30.4 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz trunc mon: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mon wholestage off 315 319 6 31.7 31.5 1.0X -trunc mon wholestage on 284 287 5 35.3 28.4 1.1X +trunc mon wholestage off 302 303 0 33.1 30.2 1.0X +trunc mon wholestage on 304 313 10 32.9 30.4 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz trunc month: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc month wholestage off 305 314 13 32.8 30.5 1.0X -trunc month wholestage on 283 292 14 35.3 28.3 1.1X +trunc month wholestage off 303 305 3 33.0 30.3 1.0X +trunc month wholestage on 304 309 7 32.9 30.4 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz trunc mm: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mm wholestage off 301 301 0 33.2 30.1 1.0X -trunc mm wholestage on 285 290 7 35.1 28.5 1.1X +trunc mm wholestage off 297 301 5 33.6 29.7 1.0X +trunc mm wholestage on 305 312 7 32.8 30.5 1.0X ================================================================================================ @@ -404,36 +404,36 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz to timestamp str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to timestamp str wholestage off 218 220 3 4.6 218.4 1.0X -to timestamp str wholestage on 213 216 6 4.7 212.5 1.0X +to timestamp str wholestage off 222 226 5 4.5 222.4 1.0X +to timestamp str wholestage on 213 215 4 4.7 212.5 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz to_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_timestamp wholestage off 1838 1842 5 0.5 1838.1 1.0X -to_timestamp wholestage on 1952 1971 11 0.5 1952.2 0.9X +to_timestamp wholestage off 1763 1765 3 0.6 1762.6 1.0X +to_timestamp wholestage on 1735 1747 10 0.6 1735.1 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz to_unix_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_unix_timestamp wholestage off 1987 1988 1 0.5 1986.9 1.0X -to_unix_timestamp wholestage on 1944 1948 3 0.5 1944.2 1.0X +to_unix_timestamp wholestage off 1773 1776 4 0.6 1773.1 1.0X +to_unix_timestamp wholestage on 1775 1784 7 0.6 1774.9 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz to date str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to date str wholestage off 263 264 0 3.8 263.5 1.0X -to date str wholestage on 263 265 2 3.8 262.6 1.0X +to date str wholestage off 271 283 17 3.7 271.2 1.0X +to date str wholestage on 262 266 4 3.8 262.2 1.0X OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aws Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz to_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_date wholestage off 3560 3567 11 0.3 3559.7 1.0X -to_date wholestage on 3525 3534 10 0.3 3524.8 1.0X +to_date wholestage off 3250 3266 23 0.3 3250.2 1.0X +to_date wholestage on 3144 3154 13 0.3 3143.7 1.0X ================================================================================================ @@ -444,14 +444,14 @@ OpenJDK 64-Bit Server VM 1.8.0_252-8u252-b09-1~18.04-b09 on Linux 4.15.0-1063-aw Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz To/from Java's date-time: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -From java.sql.Date 405 416 16 12.3 81.0 1.0X -From java.time.LocalDate 344 352 14 14.5 68.8 1.2X -Collect java.sql.Date 1622 2553 1372 3.1 324.4 0.2X -Collect java.time.LocalDate 1464 1482 20 3.4 292.8 0.3X -From java.sql.Timestamp 248 258 15 20.2 49.6 1.6X -From java.time.Instant 237 243 7 21.1 47.4 1.7X -Collect longs 1252 1341 109 4.0 250.5 0.3X -Collect java.sql.Timestamp 1515 1516 2 3.3 302.9 0.3X -Collect java.time.Instant 1379 1490 96 3.6 275.8 0.3X +From java.sql.Date 413 420 12 12.1 82.5 1.0X +From java.time.LocalDate 344 348 4 14.5 68.9 1.2X +Collect java.sql.Date 1934 2775 1162 2.6 386.9 0.2X +Collect java.time.LocalDate 1441 1469 31 3.5 288.3 0.3X +From java.sql.Timestamp 251 256 4 19.9 50.2 1.6X +From java.time.Instant 246 253 6 20.4 49.1 1.7X +Collect longs 1332 1403 118 3.8 266.4 0.3X +Collect java.sql.Timestamp 1373 1412 39 3.6 274.6 0.3X +Collect java.time.Instant 1489 1519 35 3.4 297.7 0.3X