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