Preliminary results

This commit is contained in:
Alexey Milovidov 2020-08-12 06:44:49 +03:00
parent b8e6de7ca3
commit 2acfe2324b
3 changed files with 346 additions and 100 deletions

295
benchmark/monetdb/log.txt Normal file
View File

@ -0,0 +1,295 @@
SELECT count(*) FROM hits;
1 tuple
clk: 1.250 ms
1 tuple
clk: 1.215 ms
1 tuple
clk: 1.187 ms
SELECT count(*) FROM hits WHERE "AdvEngineID" <> 0;
1 tuple
clk: 1.468 sec
1 tuple
clk: 1.726 sec
1 tuple
clk: 2.369 sec
SELECT sum("AdvEngineID"), count(*), avg("ResolutionWidth") FROM hits;
1 tuple
clk: 748.860 ms
1 tuple
clk: 655.206 ms
1 tuple
clk: 686.095 ms
SELECT sum("UserID") FROM hits;
clk: 683.854 ms
clk: 702.824 ms
clk: 697.182 ms
SELECT COUNT(DISTINCT "UserID") FROM hits;
1 tuple
clk: 8.918 sec
1 tuple
clk: 11.265 sec
1 tuple
clk: 6.662 sec
SELECT COUNT(DISTINCT "SearchPhrase") FROM hits;
1 tuple
clk: 15.144 sec
1 tuple
clk: 15.054 sec
1 tuple
clk: 15.074 sec
SELECT min("EventDate"), max("EventDate") FROM hits;
1 tuple
clk: 695.901 ms
1 tuple
clk: 671.020 ms
1 tuple
clk: 669.029 ms
SELECT "AdvEngineID", count(*) FROM hits WHERE "AdvEngineID" <> 0 GROUP BY "AdvEngineID" ORDER BY count(*) DESC;
18 tuples
clk: 1.425 sec
18 tuples
clk: 1.421 sec
18 tuples
clk: 1.441 sec
SELECT "RegionID", COUNT(DISTINCT "UserID") AS u FROM hits GROUP BY "RegionID" ORDER BY u DESC LIMIT 10;
10 tuples
clk: 10.135 sec
10 tuples
clk: 10.278 sec
10 tuples
clk: 9.905 sec
SELECT "RegionID", sum("AdvEngineID"), count(*) AS c, avg("ResolutionWidth"), COUNT(DISTINCT "UserID") FROM hits GROUP BY "RegionID" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 8.765 sec
10 tuples
clk: 8.729 sec
10 tuples
clk: 8.504 sec
SELECT "MobilePhoneModel", COUNT(DISTINCT "UserID") AS u FROM hits WHERE "MobilePhoneModel" <> '' GROUP BY "MobilePhoneModel" ORDER BY u DESC LIMIT 10;
10 tuples
clk: 3.196 sec
10 tuples
clk: 3.347 sec
10 tuples
clk: 3.276 sec
SELECT "MobilePhone", "MobilePhoneModel", COUNT(DISTINCT "UserID") AS u FROM hits WHERE "MobilePhoneModel" <> '' GROUP BY "MobilePhone", "MobilePhoneModel" ORDER BY u DESC LIMIT 10;
10 tuples
clk: 3.360 sec
10 tuples
clk: 3.398 sec
10 tuples
clk: 3.422 sec
SELECT "SearchPhrase", count(*) AS c FROM hits WHERE "SearchPhrase" <> '' GROUP BY "SearchPhrase" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 10.501 sec
10 tuples
clk: 10.388 sec
10 tuples
clk: 10.305 sec
SELECT "SearchPhrase", COUNT(DISTINCT "UserID") AS u FROM hits WHERE "SearchPhrase" <> '' GROUP BY "SearchPhrase" ORDER BY u DESC LIMIT 10;
10 tuples
clk: 15.811 sec
10 tuples
clk: 15.463 sec
10 tuples
clk: 15.017 sec
SELECT "SearchEngineID", "SearchPhrase", count(*) AS c FROM hits WHERE "SearchPhrase" <> '' GROUP BY "SearchEngineID", "SearchPhrase" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 11.336 sec
10 tuples
clk: 11.229 sec
10 tuples
clk: 11.069 sec
SELECT "UserID", count(*) FROM hits GROUP BY "UserID" ORDER BY count(*) DESC LIMIT 10;
10 tuples
clk: 6.965 sec
10 tuples
clk: 6.884 sec
10 tuples
clk: 6.907 sec
SELECT "UserID", "SearchPhrase", count(*) FROM hits GROUP BY "UserID", "SearchPhrase" ORDER BY count(*) DESC LIMIT 10;
10 tuples
clk: 28.985 sec
10 tuples
clk: 29.714 sec
10 tuples
clk: 28.438 sec
SELECT "UserID", "SearchPhrase", count(*) FROM hits GROUP BY "UserID", "SearchPhrase" LIMIT 10;
10 tuples
clk: 27.820 sec
10 tuples
clk: 29.318 sec
10 tuples
clk: 29.515 sec
SELECT "UserID", extract(minute FROM "EventTime") AS m, "SearchPhrase", count(*) FROM hits GROUP BY "UserID", m, "SearchPhrase" ORDER BY count(*) DESC LIMIT 10;
10 tuples
clk: 46.359 sec
10 tuples
clk: 46.382 sec
10 tuples
clk: 46.353 sec
SELECT "UserID" FROM hits WHERE "UserID" = -6101065172474983726;
0 tuples
clk: 750.670 ms
0 tuples
clk: 768.232 ms
0 tuples
clk: 765.361 ms
SELECT count(*) FROM hits WHERE "URL" LIKE '%metrika%';
1 tuple
clk: 3.938 sec
1 tuple
clk: 3.932 sec
1 tuple
clk: 3.915 sec
SELECT "SearchPhrase", min("URL"), count(*) AS c FROM hits WHERE "URL" LIKE '%metrika%' AND "SearchPhrase" <> '' GROUP BY "SearchPhrase" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 3.742 sec
10 tuples
clk: 3.784 sec
10 tuples
clk: 3.727 sec
SELECT "SearchPhrase", min("URL"), min("Title"), count(*) AS c, COUNT(DISTINCT "UserID") FROM hits WHERE "Title" LIKE '%Яндекс%' AND "URL" NOT LIKE '%.yandex.%' AND "SearchPhrase" <> '' GROUP BY "SearchPhrase" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 6.024 sec
10 tuples
clk: 5.948 sec
10 tuples
clk: 6.001 sec
SELECT * FROM hits WHERE "URL" LIKE '%metrika%' ORDER BY "EventTime" LIMIT 10;
10 tuples !87 columns dropped, 29 fields truncated!
clk: 4.130 sec
10 tuples !87 columns dropped, 29 fields truncated!
clk: 4.138 sec
10 tuples !87 columns dropped, 29 fields truncated!
clk: 4.270 sec
SELECT "SearchPhrase" FROM hits WHERE "SearchPhrase" <> '' ORDER BY "EventTime" LIMIT 10;
10 tuples
clk: 6.659 sec
10 tuples
clk: 6.751 sec
10 tuples
clk: 6.674 sec
SELECT "SearchPhrase" FROM hits WHERE "SearchPhrase" <> '' ORDER BY "SearchPhrase" LIMIT 10;
10 tuples
clk: 6.817 sec
10 tuples
clk: 6.745 sec
10 tuples
clk: 6.793 sec
SELECT "SearchPhrase" FROM hits WHERE "SearchPhrase" <> '' ORDER BY "EventTime", "SearchPhrase" LIMIT 10;
10 tuples
clk: 6.742 sec
10 tuples
clk: 6.673 sec
10 tuples
clk: 6.743 sec
SELECT "CounterID", avg(length("URL")) AS l, count(*) AS c FROM hits WHERE "URL" <> '' GROUP BY "CounterID" HAVING count(*) > 100000 ORDER BY l DESC LIMIT 25;
25 tuples
clk: 57.559 sec
25 tuples
clk: 56.546 sec
25 tuples
clk: 58.124 sec
SELECT sys.getdomain("Referer") AS key, avg(length("Referer")) AS l, count(*) AS c, min("Referer") FROM hits WHERE "Referer" <> '' GROUP BY key HAVING count(*) > 100000 ORDER BY l DESC LIMIT 25;
clk: 1:00 min
clk: 59.189 sec
clk: 1:00 min
SELECT sum("ResolutionWidth"), sum("ResolutionWidth" + 1), sum("ResolutionWidth" + 2), sum("ResolutionWidth" + 3), sum("ResolutionWidth" + 4), sum("ResolutionWidth" + 5), sum("ResolutionWidth" + 6), sum("ResolutionWidth" + 7), sum("ResolutionWidth" + 8), sum("ResolutionWidth" + 9), sum("ResolutionWidth" + 10), sum("ResolutionWidth" + 11), sum("ResolutionWidth" + 12), sum("ResolutionWidth" + 13), sum("ResolutionWidth" + 14), sum("ResolutionWidth" + 15), sum("ResolutionWidth" + 16), sum("ResolutionWidth" + 17), sum("ResolutionWidth" + 18), sum("ResolutionWidth" + 19), sum("ResolutionWidth" + 20), sum("ResolutionWidth" + 21), sum("ResolutionWidth" + 22), sum("ResolutionWidth" + 23), sum("ResolutionWidth" + 24), sum("ResolutionWidth" + 25), sum("ResolutionWidth" + 26), sum("ResolutionWidth" + 27), sum("ResolutionWidth" + 28), sum("ResolutionWidth" + 29), sum("ResolutionWidth" + 30), sum("ResolutionWidth" + 31), sum("ResolutionWidth" + 32), sum("ResolutionWidth" + 33), sum("ResolutionWidth" + 34), sum("ResolutionWidth" + 35), sum("ResolutionWidth" + 36), sum("ResolutionWidth" + 37), sum("ResolutionWidth" + 38), sum("ResolutionWidth" + 39), sum("ResolutionWidth" + 40), sum("ResolutionWidth" + 41), sum("ResolutionWidth" + 42), sum("ResolutionWidth" + 43), sum("ResolutionWidth" + 44), sum("ResolutionWidth" + 45), sum("ResolutionWidth" + 46), sum("ResolutionWidth" + 47), sum("ResolutionWidth" + 48), sum("ResolutionWidth" + 49), sum("ResolutionWidth" + 50), sum("ResolutionWidth" + 51), sum("ResolutionWidth" + 52), sum("ResolutionWidth" + 53), sum("ResolutionWidth" + 54), sum("ResolutionWidth" + 55), sum("ResolutionWidth" + 56), sum("ResolutionWidth" + 57), sum("ResolutionWidth" + 58), sum("ResolutionWidth" + 59), sum("ResolutionWidth" + 60), sum("ResolutionWidth" + 61), sum("ResolutionWidth" + 62), sum("ResolutionWidth" + 63), sum("ResolutionWidth" + 64), sum("ResolutionWidth" + 65), sum("ResolutionWidth" + 66), sum("ResolutionWidth" + 67), sum("ResolutionWidth" + 68), sum("ResolutionWidth" + 69), sum("ResolutionWidth" + 70), sum("ResolutionWidth" + 71), sum("ResolutionWidth" + 72), sum("ResolutionWidth" + 73), sum("ResolutionWidth" + 74), sum("ResolutionWidth" + 75), sum("ResolutionWidth" + 76), sum("ResolutionWidth" + 77), sum("ResolutionWidth" + 78), sum("ResolutionWidth" + 79), sum("ResolutionWidth" + 80), sum("ResolutionWidth" + 81), sum("ResolutionWidth" + 82), sum("ResolutionWidth" + 83), sum("ResolutionWidth" + 84), sum("ResolutionWidth" + 85), sum("ResolutionWidth" + 86), sum("ResolutionWidth" + 87), sum("ResolutionWidth" + 88), sum("ResolutionWidth" + 89) FROM hits;
1 tuple !77 columns dropped!
clk: 6.374 sec
1 tuple !77 columns dropped!
clk: 6.428 sec
1 tuple !77 columns dropped!
clk: 6.115 sec
SELECT "SearchEngineID", "ClientIP", count(*) AS c, sum("Refresh"), avg("ResolutionWidth") FROM hits WHERE "SearchPhrase" <> '' GROUP BY "SearchEngineID", "ClientIP" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 5.336 sec
10 tuples
clk: 5.555 sec
10 tuples
clk: 5.342 sec
SELECT "WatchID", "ClientIP", count(*) AS c, sum("Refresh"), avg("ResolutionWidth") FROM hits WHERE "SearchPhrase" <> '' GROUP BY "WatchID", "ClientIP" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 6.184 sec
10 tuples
clk: 6.252 sec
10 tuples
clk: 6.541 sec
SELECT "WatchID", "ClientIP", count(*) AS c, sum("Refresh"), avg("ResolutionWidth") FROM hits GROUP BY "WatchID", "ClientIP" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 43.900 sec
10 tuples
clk: 42.386 sec
10 tuples
clk: 43.674 sec
SELECT "URL", count(*) AS c FROM hits GROUP BY "URL" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 1:25 min
10 tuples
clk: 1:23 min
10 tuples
clk: 1:23 min
SELECT 1, "URL", count(*) AS c FROM hits GROUP BY 1, "URL" ORDER BY c DESC LIMIT 10;
10 tuples
clk: 1:23 min
10 tuples
clk: 1:22 min
10 tuples
clk: 1:23 min
SELECT "ClientIP", "ClientIP" - 1, "ClientIP" - 2, "ClientIP" - 3, count(*) AS c FROM hits GROUP BY "ClientIP", "ClientIP" - 1, "ClientIP" - 2, "ClientIP" - 3 ORDER BY c DESC LIMIT 10;
10 tuples
clk: 26.289 sec
10 tuples
clk: 25.788 sec
10 tuples
clk: 24.693 sec
SELECT "URL", count(*) AS "PageViews" FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "DontCountHits" = 0 AND "Refresh" = 0 AND "URL" <> '' GROUP BY "URL" ORDER BY "PageViews" DESC LIMIT 10;
10 tuples
clk: 4.506 sec
10 tuples
clk: 4.503 sec
10 tuples
clk: 4.496 sec
SELECT "Title", count(*) AS "PageViews" FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "DontCountHits" = 0 AND "Refresh" = 0 AND "Title" <> '' GROUP BY "Title" ORDER BY "PageViews" DESC LIMIT 10;
10 tuples
clk: 4.306 sec
10 tuples
clk: 4.337 sec
10 tuples
clk: 4.355 sec
SELECT "URL", count(*) AS "PageViews" FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "Refresh" = 0 AND "IsLink" <> 0 AND "IsDownload" = 0 GROUP BY "URL" ORDER BY "PageViews" DESC LIMIT 1000;
1000 tuples
clk: 4.274 sec
1000 tuples
clk: 4.145 sec
1000 tuples
clk: 4.305 sec
SELECT "TraficSourceID", "SearchEngineID", "AdvEngineID", CASE WHEN ("SearchEngineID" = 0 AND "AdvEngineID" = 0) THEN "Referer" ELSE '' END AS Src, "URL" AS Dst, count(*) AS "PageViews" FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "Refresh" = 0 GROUP BY "TraficSourceID", "SearchEngineID", "AdvEngineID", CASE WHEN ("SearchEngineID" = 0 AND "AdvEngineID" = 0) THEN "Referer" ELSE '' END, "URL" ORDER BY "PageViews" DESC LIMIT 1000;
1000 tuples
clk: 3.175 sec
1000 tuples
clk: 3.121 sec
1000 tuples
clk: 3.186 sec
SELECT "URLHash", "EventDate", count(*) AS "PageViews" FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "Refresh" = 0 AND "TraficSourceID" IN (-1, 6) AND "RefererHash" = 686716256552154761 GROUP BY "URLHash", "EventDate" ORDER BY "PageViews" DESC LIMIT 100;
0 tuples
clk: 2.600 sec
0 tuples
clk: 2.598 sec
0 tuples
clk: 2.507 sec
SELECT "WindowClientWidth", "WindowClientHeight", count(*) AS "PageViews" FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "Refresh" = 0 AND "DontCountHits" = 0 AND "URLHash" = 686716256552154761 GROUP BY "WindowClientWidth", "WindowClientHeight" ORDER BY "PageViews" DESC LIMIT 10000;
0 tuples
clk: 4.239 sec
0 tuples
clk: 4.205 sec
0 tuples
clk: 4.166 sec
SELECT DATE_TRUNC('minute', "EventTime") AS "Minute", count(*) AS "PageViews" FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-02' AND "Refresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', "EventTime") ORDER BY DATE_TRUNC('minute', "EventTime");
0 tuples
clk: 4.109 sec
0 tuples
clk: 4.222 sec
0 tuples
clk: 4.209 sec

View File

@ -1200,3 +1200,9 @@ sql>SELECT count(*) FROM hits WHERE "CounterID" = 62;
1 tuple 1 tuple
clk: 1.406 sec clk: 1.406 sec
``` ```
How to prepare the benchmark report:
`grep clk log.txt | awk '{ if ($3 == "ms") { print $2 / 1000; } else if ($3 == "sec") { print $2 } else { print } }'`

View File

@ -1,110 +1,55 @@
[ [
{ {
"system": "MonetDB", "system": "MonetDB",
"version": "", "version": "11.37.11 (Jun2020-SP1)",
"data_size": 10000000,
"time": "",
"comments": "",
"result":
[
[0.003851, 0.003389, 0.003633],
[0.400058, 0.045117, 0.007999],
[0.207544, 0.022219, 0.033007],
[null, null, null],
[0.873236, 0.61427, 0.564001],
[3.1, 2.8, 2.9],
[0.191616, 0.004704, 0.008579],
[0.056658, 0.049444, 0.035463],
[5.8, 5.8, 6.4],
[5.8, 8.4, 8.5],
[0.458164, 0.319166, 0.413914],
[0.344021, 0.314183, 0.348057],
[6.1, 13.3, 6.1],
[5.8, 5.6, 5.5],
[54.9, 70.0, 58.4],
[0.886465, 0.711899, 0.7329],
[5.8, 5.9, 5.9],
[5.8, 5.9, 6.0],
[20.2, 19.7, 21.0],
[0.331309, 0.000618, 0.085817],
[2.0, 0.056549, 0.09292],
[0.053756, 0.050622, 0.054916],
[2.2, 0.069379, 0.066628],
[13.0, 0.511351, 0.484708],
[0.137787, 0.030937, 0.030501],
[0.039574, 0.027741, 0.025684],
[0.046094, 0.043038, 0.039139],
[4.1, 2.7, 2.7],
[null, null, null],
[1.1, 0.940847, 0.921118],
[17.7, 18.2, 17.5],
[2.0, 0.236466, 0.236223],
[1.3, 1.3, 1.3],
[138.0, 140.0, 173.0],
[null, null, null],
[null, null, null],
[169.0, 175.0, null],
[261.0, 257.0, 268.0],
[3.1, 0.513628, 0.464017],
[262.0, 252.0, 257.0],
[0.524173, 0.066989, 0.123604],
[0.305343, 0.030736, 0.048725],
[2.3, 1.9, 1.9]
]
},
{
"system": "MonetDB",
"version": "",
"data_size": 100000000, "data_size": 100000000,
"time": "", "time": "2020-08-12",
"comments": "", "comments": "",
"result": "result":
[ [
[0.028886, 0.003581, 0.003829], [0.00125, 0.001215, 0.001187],
[2.7, 0.139637, 0.060264], [1.468, 1.726, 2.369],
[1.1, 0.146556, 0.146063], [0.74886, 0.655206, 0.686095],
[null, null, null], [0.683854, 0.702824, 0.697182],
[7.5, 5.6, 5.4], [8.918, 11.265, 6.662],
[15.5, 12.7, 11.5], [15.144, 15.054, 15.074],
[1.0, 0.038566, 0.036837], [0.695901, 0.67102, 0.669029],
[0.687604, 0.026271, 0.030261], [1.425, 1.421, 1.441],
[195.0, 214.0, null], [10.135, 10.278, 9.905],
[254.0, 267.0, 265.0], [8.765, 8.729, 8.504],
[22.9, 20.0, 20.8], [3.196, 3.347, 3.276],
[20.4, 20.8, 23.3], [3.360, 3.398, 3.422],
[97.0, 115.0, null], [10.501, 10.388, 10.305],
[111.0, 84.0, 58.8], [15.811, 15.463, 15.017],
[656.0, null, null], [11.336, 11.229, 11.069],
[6.8, 6.9, 6.7], [6.965, 6.884, 6.907],
[264.0, 234.0, 208.0], [28.985, 29.714, 28.438],
[222.0, 279.0, null], [27.820, 29.318, 29.515],
[1173.0, null, null], [46.359, 46.382, 46.353],
[3.9, 0.000787, 0.032566], [0.75067, 0.768232, 0.765361],
[27.4, 1.7, 2.1], [3.938, 3.932, 3.915],
[4.0, 2.6, 2.6], [3.742, 3.784, 3.727],
[null, null, null], [6.024, 5.948, 6.001],
[209.0, 155, 143], [4.130, 4.138, 4.270],
[10.5, 5.7, 40.9], [6.659, 6.751, 6.674],
[4.8, 4.7, 4.7], [6.817, 6.745, 6.793],
[85.0, 4.7, 5.7], [6.742, 6.673, 6.743],
[52.4, 30.3, 29.1], [57.559, 56.546, 58.124],
[null, null, null], [60, 59.189, 60],
[null, null, null], [6.374, 6.428, 6.115],
[12.7, 11.2, 11.4], [5.336, 5.555, 5.342],
[392.0, 370.0, null], [6.184, 6.252, 6.541],
[3.2, 1.8, 1.8], [43.900, 42.386, 43.674],
[41.9, 37.0, 40.7], [85, 83, 83],
[null, null, null], [83, 82, 83],
[null, null, null], [26.289, 25.788, 24.693],
[null, null, null], [4.506, 4.503, 4.496],
[6.4, 2.3, 2.1], [4.306, 4.337, 4.355],
[3.6, 1.0, 1.1], [4.274, 4.145, 4.305],
[1.5, 1.2, 1.3], [3.175, 3.121, 3.186],
[7.2, 4.6, 4.9], [2.600, 2.598, 2.507],
[2.8, 0.050916, 0.04148], [4.239, 4.205, 4.166],
[3.0, 0.045935, 0.047277], [4.109, 4.222, 4.209]
[2.5, 0.049119, 0.04828]
] ]
} }
] ]