On AWS S3 Performance
tip
- Dataset: ontime, 60.8 GB Raw CSV Data, 202687654 records
- Hardware: EC2(c5n.9xlarge), 36 CPUs
- Storage: S3(us-east-2)
- Databend: v0.6.88-nightly
Q1 (0.335 sec, 181.88 million rows/s., 545.63 MB/s.)β
SELECT
DayOfWeek,
count(*) AS c
FROM ontime
WHERE (Year >= 2000) AND (Year <= 2008)
GROUP BY DayOfWeek
ORDER BY c DESC
databend :) SELECT DayOfWeek, count(*) AS c FROM ontime WHERE Year >= 2000 AND Year <= 2008 GROUP BY DayOfWeek ORDER BY c DESC;
ββDayOfWeekββ¬βββββββcββ
β 5 β 8732422 β
β 1 β 8730614 β
β 4 β 8710843 β
β 3 β 8685626 β
β 2 β 8639632 β
β 7 β 8274367 β
β 6 β 7514194 β
βββββββββββββ΄ββββββββββ
7 rows in set. Elapsed: 0.335 sec. Processed 61.00 million rows, 183.00 MB (181.88 million rows/s., 545.63 MB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: DayOfWeek:UInt8, count() as c:UInt64 β
β Sort: count():UInt64 β
β AggregatorFinal: groupBy=[[DayOfWeek]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[DayOfWeek]], aggr=[[count()]] β
β Filter: ((Year >= 2000) and (Year <= 2008)) β
β ReadDataSource: scan schema: [Year:UInt16, DayOfWeek:UInt8], statistics: [read_rows: 61000000, read_bytes: 183000000, partitions_scanned: 61, partitions_total: 203], push_downs: [projections: [0, 4], filters: [((Year >= 2000) AND (Year <= 2008))]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q2 (0.545 sec, 111.90 million rows/s., 783.29 MB/s.)β
SELECT
DayOfWeek,
count(*) AS c
FROM ontime
WHERE (DepDelay > 10) AND (Year >= 2000) AND (Year <= 2008)
GROUP BY DayOfWeek
ORDER BY c DESC
databend :) SELECT DayOfWeek, count(*) AS c FROM ontime WHERE DepDelay>10 AND Year >= 2000 AND Year <= 2008 GROUP BY DayOfWeek ORDER BY c DESC;
ββDayOfWeekββ¬βββββββcββ
β 5 β 2175733 β
β 4 β 2012848 β
β 1 β 1898879 β
β 7 β 1880896 β
β 3 β 1757508 β
β 2 β 1665303 β
β 6 β 1510894 β
βββββββββββββ΄ββββββββββ
7 rows in set. Elapsed: 0.545 sec. Processed 61.00 million rows, 427.00 MB (111.90 million rows/s., 783.29 MB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: DayOfWeek:UInt8, count() as c:UInt64 β
β Sort: count():UInt64 β
β AggregatorFinal: groupBy=[[DayOfWeek]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[DayOfWeek]], aggr=[[count()]] β
β Filter: (((DepDelay > 10) and (Year >= 2000)) and (Year <= 2008)) β
β ReadDataSource: scan schema: [Year:UInt16, DayOfWeek:UInt8, DepDelay:Int32], statistics: [read_rows: 61000000, read_bytes: 427000000, partitions_scanned: 61, partitions_total: 203], push_downs: [projections: [0, 4, 31], filters: [(((DepDelay > 10) AND (Year >= 2000)) AND (Year <= 2008))]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q3 (0.665 sec., 91.67 million rows/s., 1.56 GB/s.)β
SELECT
Origin,
count(*) AS c
FROM ontime
WHERE (DepDelay > 10) AND (Year >= 2000) AND (Year <= 2008)
GROUP BY Origin
ORDER BY c DESC
LIMIT 10
databend :) SELECT Origin, count(*) AS c FROM ontime WHERE DepDelay>10 AND Year >= 2000 AND Year <= 2008 GROUP BY Origin ORDER BY c DESC LIMIT 10;
ββOriginββ¬ββββββcββ
β ORD β 860911 β
β ATL β 831822 β
β DFW β 614403 β
β LAX β 402671 β
β PHX β 400475 β
β LAS β 362026 β
β DEN β 352893 β
β EWR β 302267 β
β DTW β 296832 β
β IAH β 290729 β
ββββββββββ΄βββββββββ
10 rows in set. Elapsed: 0.665 sec. Processed 61.00 million rows, 1.04 GB (91.67 million rows/s., 1.56 GB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Limit: 10 β
β Projection: Origin:String, count() as c:UInt64 β
β Sort: count():UInt64 β
β AggregatorFinal: groupBy=[[Origin]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[Origin]], aggr=[[count()]] β
β Filter: (((DepDelay > 10) and (Year >= 2000)) and (Year <= 2008)) β
β ReadDataSource: scan schema: [Year:UInt16, Origin:String, DepDelay:Int32], statistics: [read_rows: 61000000, read_bytes: 1037000488, partitions_scanned: 61, partitions_total: 203], push_downs: [projections: [0, 14, 31], filters: [(((DepDelay > 10) AND (Year >= 2000)) AND (Year <= 2008))]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q4 (0.274 sec., 29.16 million rows/s., 466.48 MB/s.)β
SELECT
IATA_CODE_Reporting_Airline AS Carrier,
count()
FROM ontime
WHERE (DepDelay > 10) AND (Year = 2007)
GROUP BY Carrier
ORDER BY count() DESC
databend :) SELECT IATA_CODE_Reporting_Airline AS Carrier, count() FROM ontime WHERE DepDelay>10 AND Year = 2007 GROUP BY Carrier ORDER BY count() DESC;
ββCarrierββ¬βcount()ββ
β WN β 296451 β
β AA β 179769 β
β MQ β 152293 β
β OO β 147019 β
β US β 140199 β
β UA β 135061 β
β XE β 108571 β
β EV β 104055 β
β NW β 102206 β
β DL β 98427 β
β CO β 81039 β
β YV β 79553 β
β FL β 64583 β
β OH β 60532 β
β AS β 54326 β
β B6 β 53716 β
β 9E β 48578 β
β F9 β 24100 β
β AQ β 6764 β
β HA β 4059 β
βββββββββββ΄ββββββββββ
20 rows in set. Elapsed: 0.274 sec. Processed 8.00 million rows, 128.00 MB (29.16 million rows/s., 466.48 MB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: IATA_CODE_Reporting_Airline as Carrier:String, count():UInt64 β
β Sort: count():UInt64 β
β AggregatorFinal: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[count()]] β
β Filter: ((DepDelay > 10) and (Year = 2007)) β
β ReadDataSource: scan schema: [Year:UInt16, IATA_CODE_Reporting_Airline:String, DepDelay:Int32], statistics: [read_rows: 8000000, read_bytes: 128000064, partitions_scanned: 8, partitions_total: 203], push_downs: [projections: [0, 8, 31], filters: [((DepDelay > 10) AND (Year = 2007))]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q5 (0.273 sec., 29.31 million rows/s., 468.99 MB/s.)β
SELECT
IATA_CODE_Reporting_Airline AS Carrier,
avg(CAST(DepDelay > 10, Int8)) * 1000 AS c3
FROM ontime
WHERE Year = 2007
GROUP BY Carrier
ORDER BY c3 DESC
databend :) SELECT IATA_CODE_Reporting_Airline AS Carrier, avg(cast(DepDelay>10 as Int8))*1000 AS c3 FROM ontime WHERE Year=2007 GROUP BY Carrier ORDER BY c3 DESC;
ββCarrierββ¬βββββββββββββββββc3ββ
β EV β 363.53123668047823 β
β AS β 339.1453631738303 β
β US β 288.8039271022377 β
β AA β 283.6112877194699 β
β MQ β 281.7663100792978 β
β B6 β 280.5745625489684 β
β UA β 275.63356884257615 β
β YV β 270.25567158804466 β
β OH β 256.4567516268981 β
β WN β 253.62165713752844 β
β CO β 250.77750030171651 β
β XE β 249.71881878589517 β
β NW β 246.56113247419944 β
β F9 β 246.52209492635023 β
β OO β 245.90051515354253 β
β FL β 245.4143692596491 β
β DL β 206.82764258051773 β
β 9E β 187.66780889391967 β
β AQ β 145.9016393442623 β
β HA β 72.25634178905207 β
βββββββββββ΄βββββββββββββββββββββ
20 rows in set. Elapsed: 0.273 sec. Processed 8.00 million rows, 128.00 MB (29.31 million rows/s., 468.99 MB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: IATA_CODE_Reporting_Airline as Carrier:String, (avg(cast((DepDelay > 10) as Int8)) * 1000) as c3:Float64 β
β Sort: (avg(cast((DepDelay > 10) as Int8)) * 1000):Float64 β
β Expression: IATA_CODE_Reporting_Airline:String, (avg(cast((DepDelay > 10) as Int8)) * 1000):Float64 (Before OrderBy) β
β AggregatorFinal: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[avg(cast((DepDelay > 10) as Int8))]] β
β AggregatorPartial: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[avg(cast((DepDelay > 10) as Int8))]] β
β Expression: IATA_CODE_Reporting_Airline:String, cast((DepDelay > 10) as Int8):Int8 (Before GroupBy) β
β Filter: (Year = 2007) β
β ReadDataSource: scan schema: [Year:UInt16, IATA_CODE_Reporting_Airline:String, DepDelay:Int32], statistics: [read_rows: 8000000, read_bytes: 128000064, partitions_scanned: 8, partitions_total: 203], push_downs: [projections: [0, 8, 31], filters: [(Year = 2007)]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q6 (0.664 sec., 91.91 million rows/s., 1.47 GB/s.))β
SELECT
IATA_CODE_Reporting_Airline AS Carrier,
avg(CAST(DepDelay > 10, Int8)) * 1000 AS c3
FROM ontime
WHERE (Year >= 2000) AND (Year <= 2008)
GROUP BY Carrier
ORDER BY c3 DESC
databend :) SELECT IATA_CODE_Reporting_Airline AS Carrier, avg(cast(DepDelay>10 as Int8))*1000 AS c3 FROM ontime WHERE Year>=2000 AND Year <=2008 GROUP BY Carrier ORDER BY c3 DESC;
ββCarrierββ¬βββββββββββββββββc3ββ
β AS β 293.05649076611434 β
β EV β 282.0709981074399 β
β YV β 270.3897636688929 β
β B6 β 257.40594891667007 β
β FL β 249.28742951361826 β
β XE β 246.59005902424192 β
β MQ β 245.3695989400477 β
β WN β 233.38127235928863 β
β DH β 227.11013827345042 β
β F9 β 226.08455653226812 β
β UA β 224.42824657703645 β
β OH β 215.52882835147614 β
β AA β 211.97122176454556 β
β US β 206.60330294168244 β
β HP β 205.31690167066455 β
β OO β 202.4243177198239 β
β NW β 191.7393936377831 β
β TW β 188.6912623180138 β
β DL β 187.84162871590732 β
β CO β 187.71301306878976 β
β 9E β 181.6396991511518 β
β RU β 181.46244295416398 β
β TZ β 176.8928125899626 β
β AQ β 145.65911608293766 β
β HA β 79.38672451825789 β
βββββββββββ΄βββββββββββββββββββββ
25 rows in set. Elapsed: 0.664 sec. Processed 61.00 million rows, 976.00 MB (91.91 million rows/s., 1.47 GB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: IATA_CODE_Reporting_Airline as Carrier:String, (avg(cast((DepDelay > 10) as Int8)) * 1000) as c3:Float64 β
β Sort: (avg(cast((DepDelay > 10) as Int8)) * 1000):Float64 β
β Expression: IATA_CODE_Reporting_Airline:String, (avg(cast((DepDelay > 10) as Int8)) * 1000):Float64 (Before OrderBy) β
β AggregatorFinal: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[avg(cast((DepDelay > 10) as Int8))]] β
β AggregatorPartial: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[avg(cast((DepDelay > 10) as Int8))]] β
β Expression: IATA_CODE_Reporting_Airline:String, cast((DepDelay > 10) as Int8):Int8 (Before GroupBy) β
β Filter: ((Year >= 2000) and (Year <= 2008)) β
β ReadDataSource: scan schema: [Year:UInt16, IATA_CODE_Reporting_Airline:String, DepDelay:Int32], statistics: [read_rows: 61000000, read_bytes: 976000488, partitions_scanned: 61, partitions_total: 203], push_downs: [projections: [0, 8, 31], filters: [((Year >= 2000) AND (Year <= 2008))]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q7 (0.544 sec., 112.09 million rows/s., 1.79 GB/s.)β
SELECT
IATA_CODE_Reporting_Airline AS Carrier,
avg(DepDelay) * 1000 AS c3
FROM ontime
WHERE (Year >= 2000) AND (Year <= 2008)
GROUP BY Carrier
databend :) SELECT IATA_CODE_Reporting_Airline AS Carrier, avg(DepDelay) * 1000 AS c3 FROM ontime WHERE Year >= 2000 AND Year <= 2008 GROUP BY Carrier;
ββCarrierββ¬βββββββββββββββββc3ββ
β 9E β 13091.087573576122 β
β EV β 16374.703330010156 β
β AS β 14735.545887755581 β
β MQ β 14125.201554023559 β
β US β 11868.7097884053 β
β OH β 12655.103820799075 β
β WN β 10484.932610056378 β
β AA β 13508.78515494305 β
β HP β 11625.682112859839 β
β DL β 10943.456441165357 β
β FL β 15192.451732538268 β
β NW β 11717.623092632819 β
β TZ β 12618.760195758565 β
β CO β 12671.595978518368 β
β RU β 12556.249210602802 β
β F9 β 11232.889558936127 β
β TW β 10842.722114986364 β
β HA β 6851.555976883671 β
β UA β 14594.243159716054 β
β DH β 15311.949983190174 β
β OO β 11600.594852741107 β
β B6 β 16789.739456036365 β
β AQ β 7323.278123603293 β
β XE β 17092.548853057146 β
β YV β 17971.53933699898 β
βββββββββββ΄βββββββββββββββββββββ
25 rows in set. Elapsed: 0.544 sec. Processed 61.00 million rows, 976.00 MB (112.09 million rows/s., 1.79 GB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: IATA_CODE_Reporting_Airline as Carrier:String, (avg(DepDelay) * 1000) as c3:Float64 β
β Expression: IATA_CODE_Reporting_Airline:String, (avg(DepDelay) * 1000):Float64 (Before Projection) β
β AggregatorFinal: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[avg(DepDelay)]] β
β AggregatorPartial: groupBy=[[IATA_CODE_Reporting_Airline]], aggr=[[avg(DepDelay)]] β
β Filter: ((Year >= 2000) and (Year <= 2008)) β
β ReadDataSource: scan schema: [Year:UInt16, IATA_CODE_Reporting_Airline:String, DepDelay:Int32], statistics: [read_rows: 61000000, read_bytes: 976000488, partitions_scanned: 61, partitions_total: 203], push_downs: [projections: [0, 8, 31], filters: [((Year >= 2000) AND (Year <= 2008))]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q8 (1.174 sec., 172.63 million rows/s., 1.04 GB/s.))β
SELECT
Year,
avg(DepDelay)
FROM ontime
GROUP BY Year
databend :) SELECT Year, avg(DepDelay) FROM ontime GROUP BY Year;
ββYearββ¬ββββββavg(DepDelay)ββ
β 2005 β 12.60167890747495 β
β 2006 β 14.237297887039372 β
β 1991 β 6.940411174086677 β
β 2019 β 16.983263489524507 β
β 2017 β 15.70225324299191 β
β 2008 β 14.654588068064287 β
β 2002 β 9.97856700710386 β
β 2018 β 16.16188254545747 β
β 2013 β 14.901210490900201 β
β 1990 β 7.966702606180775 β
β 2012 β 13.155971481255131 β
β 2007 β 15.431738868356579 β
β 2016 β 14.643883269504837 β
β 1997 β 9.919225483813925 β
β 1999 β 11.567390524113748 β
β 2009 β 13.168984006133062 β
β 2010 β 13.202976628175891 β
β 1998 β 10.884314711941435 β
β 2003 β 9.778465263372038 β
β 1989 β 8.81845473300008 β
β 1993 β 7.207721091071671 β
β 2001 β 10.895474364001354 β
β 1987 β 8.600789281505321 β
β 2014 β 15.513697266113969 β
β 2015 β 14.638336410280733 β
β 2021 β 15.289615417399649 β
β 2000 β 13.456897681824556 β
β 2020 β 10.624498278073712 β
β 1994 β 7.758752042452116 β
β 1995 β 9.328649903752932 β
β 1996 β 11.14468468976826 β
β 1988 β 7.345867770580891 β
β 2011 β 13.496191548097778 β
β 1992 β 6.687364706154975 β
β 2004 β 11.936799840656898 β
ββββββββ΄βββββββββββββββββββββ
35 rows in set. Elapsed: 1.174 sec. Processed 202.69 million rows, 1.22 GB (172.63 million rows/s., 1.04 GB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: Year:UInt16, avg(DepDelay):Float64 β
β AggregatorFinal: groupBy=[[Year]], aggr=[[avg(DepDelay)]] β
β AggregatorPartial: groupBy=[[Year]], aggr=[[avg(DepDelay)]] β
β ReadDataSource: scan schema: [Year:UInt16, DepDelay:Int32], statistics: [read_rows: 202687654, read_bytes: 1216125924, partitions_scanned: 203, partitions_total: 203], push_downs: [projections: [0, 31]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q9 (0.425 sec., 477.26 million rows/s., 954.53 MB/s.)β
SELECT
Year,
count(*) AS c1
FROM ontime
GROUP BY Year
databend :) SELECT Year, count(*) as c1 FROM ontime GROUP BY Year;
ββYearββ¬ββββββc1ββ
β 2021 β 5443512 β
β 2016 β 5617658 β
β 1990 β 5270893 β
β 2007 β 7455458 β
β 2014 β 5819811 β
β 1991 β 5076925 β
β 2013 β 6369482 β
β 2018 β 7213446 β
β 2019 β 7422037 β
β 2009 β 6450285 β
β 1997 β 5411843 β
β 2000 β 5683047 β
β 2008 β 7009726 β
β 2011 β 6085281 β
β 1993 β 5070501 β
β 2005 β 7140596 β
β 1989 β 5041200 β
β 2006 β 7141922 β
β 1996 β 5351983 β
β 1999 β 5527884 β
β 2017 β 5674621 β
β 2001 β 5967780 β
β 1998 β 5384721 β
β 1995 β 5327435 β
β 1994 β 5180048 β
β 2003 β 6488540 β
β 2012 β 6096762 β
β 2015 β 5819079 β
β 2020 β 4688354 β
β 1992 β 5092157 β
β 2010 β 6450117 β
β 1988 β 5202095 β
β 2004 β 7129270 β
β 1987 β 1311826 β
β 2002 β 5271359 β
ββββββββ΄ββββββββββ
35 rows in set. Elapsed: 0.425 sec. Processed 202.69 million rows, 405.38 MB (477.26 million rows/s., 954.53 MB/s.)
ββexplainββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: Year:UInt16, count() as c1:UInt64 β
β AggregatorFinal: groupBy=[[Year]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[Year]], aggr=[[count()]] β
β ReadDataSource: scan schema: [Year:UInt16], statistics: [read_rows: 202687654, read_bytes: 405375308, partitions_scanned: 203, partitions_total: 203], push_downs: [projections: [0]] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q10 (0.943 sec., 214.85 million rows/s., 1.50 GB/s.)β
SELECT avg(cnt)
FROM
(
SELECT
Year,
Month,
count(*) AS cnt
FROM ontime
WHERE DepDel15 = 1
GROUP BY
Year,
Month
) AS a
databend :) SELECT avg(cnt) FROM (SELECT Year,Month,count(*) AS cnt FROM ontime WHERE DepDel15=1 GROUP BY Year,Month) a;
βββββββββββavg(cnt)ββ
β 81342.93170731707 β
βββββββββββββββββββββ
1 rows in set. Elapsed: 0.943 sec. Processed 202.69 million rows, 1.42 GB (214.85 million rows/s., 1.50 GB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: avg(cnt):Float64 β
β AggregatorFinal: groupBy=[[]], aggr=[[avg(cnt)]] β
β AggregatorPartial: groupBy=[[]], aggr=[[avg(cnt)]] β
β Projection: Year:UInt16, Month:UInt8, count() as cnt:UInt64 β
β AggregatorFinal: groupBy=[[Year, Month]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[Year, Month]], aggr=[[count()]] β
β Filter: (DepDel15 = 1) β
β ReadDataSource: scan schema: [Year:UInt16, Month:UInt8, DepDel15:Int32], statistics: [read_rows: 202687654, read_bytes: 1418813578, partitions_scanned: 203, partitions_total: 203], push_downs: [projections: [0, 2, 33], filters: [(DepDel15 = 1)]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q11 (0.695 sec., 291.47 million rows/s., 874.41 MB/s.)β
SELECT avg(c1)
FROM
(
SELECT
Year,
Month,
count(*) AS c1
FROM ontime
GROUP BY
Year,
Month
) AS a
databend :) SELECT avg(c1) FROM (SELECT Year,Month,count(*) AS c1 FROM ontime GROUP BY Year,Month) a;
ββββββββββββavg(c1)ββ
β 494360.1317073171 β
βββββββββββββββββββββ
1 rows in set. Elapsed: 0.695 sec. Processed 202.69 million rows, 608.06 MB (291.47 million rows/s., 874.41 MB/s.)
ββexplainββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: avg(c1):Float64 β
β AggregatorFinal: groupBy=[[]], aggr=[[avg(c1)]] β
β AggregatorPartial: groupBy=[[]], aggr=[[avg(c1)]] β
β Projection: Year:UInt16, Month:UInt8, count() as c1:UInt64 β
β AggregatorFinal: groupBy=[[Year, Month]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[Year, Month]], aggr=[[count()]] β
β ReadDataSource: scan schema: [Year:UInt16, Month:UInt8], statistics: [read_rows: 202687654, read_bytes: 608062962, partitions_scanned: 203, partitions_total: 203], push_downs: [projections: [0, 2]] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q12 (3.666 sec., 55.28 million rows/s., 2.34 GB/s.)β
SELECT
OriginCityName,
DestCityName,
count(*) AS c
FROM ontime
GROUP BY
OriginCityName,
DestCityName
ORDER BY c DESC
LIMIT 10
databend :) SELECT OriginCityName, DestCityName, count(*) AS c FROM ontime GROUP BY OriginCityName, DestCityName ORDER BY c DESC LIMIT 10;
ββOriginCityNameβββββ¬βDestCityNameβββββββ¬ββββββcββ
β San Francisco, CA β Los Angeles, CA β 518850 β
β Los Angeles, CA β San Francisco, CA β 515980 β
β New York, NY β Chicago, IL β 457899 β
β Chicago, IL β New York, NY β 450557 β
β Chicago, IL β Minneapolis, MN β 439491 β
β Minneapolis, MN β Chicago, IL β 435311 β
β Los Angeles, CA β Las Vegas, NV β 431245 β
β Las Vegas, NV β Los Angeles, CA β 425188 β
β New York, NY β Boston, MA β 421854 β
β Boston, MA β New York, NY β 418572 β
βββββββββββββββββββββ΄ββββββββββββββββββββ΄βββββββββ
10 rows in set. Elapsed: 3.666 sec. Processed 202.69 million rows, 8.58 GB (55.28 million rows/s., 2.34 GB/s.)
ββexplainβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Limit: 10 β
β Projection: OriginCityName:String, DestCityName:String, count() as c:UInt64 β
β Sort: count():UInt64 β
β AggregatorFinal: groupBy=[[OriginCityName, DestCityName]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[OriginCityName, DestCityName]], aggr=[[count()]] β
β ReadDataSource: scan schema: [OriginCityName:String, DestCityName:String], statistics: [read_rows: 202687654, read_bytes: 8577734415, partitions_scanned: 203, partitions_total: 203], push_downs: [projections: [15, 24]] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q13 (1.729 sec., 117.23 million rows/s., 2.48 GB/s.)β
SELECT
OriginCityName,
count(*) AS c
FROM ontime
GROUP BY OriginCityName
ORDER BY c DESC
LIMIT 10
databend :) SELECT OriginCityName, count(*) AS c FROM ontime GROUP BY OriginCityName ORDER BY c DESC LIMIT 10;
ββOriginCityNameβββββββββ¬ββββββββcββ
β Chicago, IL β 12592771 β
β Atlanta, GA β 10944276 β
β Dallas/Fort Worth, TX β 9045390 β
β Houston, TX β 6868696 β
β Los Angeles, CA β 6726120 β
β New York, NY β 6336817 β
β Denver, CO β 6311909 β
β Phoenix, AZ β 5678632 β
β Washington, DC β 5022328 β
β San Francisco, CA β 4696887 β
βββββββββββββββββββββββββ΄βββββββββββ
10 rows in set. Elapsed: 1.729 sec. Processed 202.69 million rows, 4.29 GB (117.23 million rows/s., 2.48 GB/s.)
ββexplainββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Limit: 10 β
β Projection: OriginCityName:String, count() as c:UInt64 β
β Sort: count():UInt64 β
β AggregatorFinal: groupBy=[[OriginCityName]], aggr=[[count()]] β
β AggregatorPartial: groupBy=[[OriginCityName]], aggr=[[count()]] β
β ReadDataSource: scan schema: [OriginCityName:String], statistics: [read_rows: 202687654, read_bytes: 4288897378, partitions_scanned: 203, partitions_total: 203], push_downs: [projections: [15]] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Q14β
SELECT
count(*)
FROM ontime;
databend :) SELECT count(*) FROM ontime;
βββββCount()βββ
β 202687654 β
βββββββββββββββ
ββexplainββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Projection: count():UInt64 β
β Projection: 202687654 as count():UInt64 β
β Expression: 202687654:UInt64 (Exact Statistics) β
β ReadDataSource: scan schema: [dummy:UInt8], statistics: [read_rows: 1, read_bytes: 1, partitions_scanned: 1, partitions_total: 1] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ