Commit 230e6388 authored by Stanley Clark's avatar Stanley Clark
Browse files

New analysis

parent 2aeee5da
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
query,trial,case,num_results,user_id,ra,apriori,plan,expand,string,db
3,0,,64,,,,,,,786.432
3,0,1,64,1,27.0,72.0,509.0,421.0,13537.0,55176.888
3,1,1,64,1,17.0,131.0,540.0,814.0,21165.0,23592.729
3,2,1,64,1,6.0,30.0,193.0,223.0,19531.0,12403.158
3,3,1,64,1,5.0,28.0,160.0,172.0,35694.0,12354.03
3,4,1,64,1,6.0,31.0,142.0,167.0,38728.0,13958.339
3,5,1,64,1,4.0,24.0,137.0,175.0,36325.0,15532.371
3,6,1,64,1,6.0,22.0,138.0,177.0,45940.0,12939.274
3,7,1,64,1,3.0,20.0,139.0,179.0,49298.0,20384.103
3,8,1,64,1,7.0,43.0,275.0,463.0,34605.0,18510.204
3,9,1,64,1,3.0,22.0,107.0,145.0,17353.0,12910.764
3,10,1,64,1,3.0,18.0,113.0,154.0,41199.0,12302.146
3,11,1,64,1,4.0,18.0,113.0,136.0,49514.0,13020.734
3,12,1,64,1,3.0,18.0,115.0,161.0,62451.0,12645.487
3,13,1,64,1,5.0,19.0,105.0,136.0,38478.0,13906.959
3,14,1,64,1,5.0,35.0,159.0,225.0,42986.0,17929.547
3,15,1,64,1,4.0,18.0,106.0,124.0,30813.0,12588.131
3,16,1,64,1,4.0,19.0,100.0,140.0,47161.0,14592.615
3,17,1,64,1,3.0,16.0,154.0,136.0,30228.0,21172.688
3,18,1,64,1,4.0,15.0,91.0,120.0,30727.0,12831.304
3,19,1,64,1,3.0,17.0,92.0,127.0,34580.0,14712.27
3,20,1,64,1,3.0,15.0,100.0,175.0,39324.0,12241.602
3,21,1,64,1,5.0,17.0,98.0,136.0,41612.0,12939.225
3,22,1,64,1,2.0,14.0,87.0,117.0,39812.0,12415.028
3,23,1,64,1,3.0,18.0,109.0,137.0,50308.0,15786.781
3,24,1,64,1,4.0,18.0,101.0,134.0,61164.0,13086.568
3,0,2,64,1,2.0,39.0,143.0,153.0,47113.0,12234.748
3,1,2,64,1,2.0,14.0,112.0,101.0,29364.0,12454.994
3,2,2,64,1,2.0,14.0,118.0,110.0,47056.0,12164.085
3,3,2,64,1,3.0,14.0,122.0,115.0,32469.0,21639.235
3,4,2,64,1,2.0,14.0,138.0,102.0,52501.0,12945.422
3,5,2,64,1,2.0,17.0,122.0,107.0,29149.0,12571.374
3,6,2,64,1,2.0,20.0,105.0,100.0,50080.0,12433.973
3,7,2,64,1,4.0,17.0,128.0,119.0,46668.0,13252.039
3,8,2,64,1,2.0,13.0,111.0,109.0,44209.0,16687.017
3,9,2,64,1,2.0,13.0,125.0,111.0,45820.0,12849.846
3,10,2,64,1,4.0,15.0,129.0,112.0,52381.0,49152.976
3,11,2,64,1,2.0,13.0,120.0,135.0,13266.0,12862.546
3,12,2,64,1,2.0,12.0,119.0,99.0,52089.0,14027.244
3,13,2,64,1,3.0,13.0,110.0,103.0,50148.0,13299.802
3,14,2,64,1,2.0,12.0,105.0,94.0,16665.0,26673.325
3,15,2,64,1,2.0,11.0,105.0,93.0,32806.0,13636.881
3,16,2,64,1,2.0,13.0,122.0,121.0,56362.0,18235.468
3,17,2,64,1,2.0,12.0,136.0,99.0,41161.0,12423.645
3,18,2,64,1,2.0,11.0,105.0,126.0,49881.0,12530.038
3,19,2,64,1,2.0,12.0,126.0,120.0,13549.0,12510.073
3,20,2,64,1,3.0,13.0,107.0,94.0,39194.0,12616.531
3,21,2,64,1,3.0,13.0,105.0,94.0,46139.0,12396.66
3,22,2,64,1,2.0,13.0,107.0,94.0,45948.0,13008.867
3,23,2,64,1,3.0,13.0,105.0,94.0,37668.0,12349.296
3,24,2,64,1,2.0,12.0,117.0,106.0,45643.0,12541.754
3,0,,59,,,,,,,33.064
3,0,1,59,2,3.0,15.0,92.0,122.0,36652.0,47893.712
3,1,1,59,2,2.0,10.0,91.0,111.0,12750.0,52531.943
3,2,1,59,2,2.0,39.0,85.0,105.0,11841.0,55295.561
3,3,1,59,2,2.0,11.0,124.0,140.0,12150.0,48967.825
3,4,1,59,2,3.0,14.0,120.0,107.0,19568.0,31722.709
3,5,1,59,2,2.0,11.0,86.0,161.0,14775.0,27274.8
3,6,1,59,2,3.0,13.0,91.0,229.0,12040.0,66587.048
3,7,1,59,2,2.0,11.0,82.0,107.0,11775.0,40419.243
3,8,1,59,2,2.0,11.0,83.0,109.0,24587.0,47547.346
3,9,1,59,2,2.0,11.0,82.0,111.0,13733.0,55825.943
3,10,1,59,2,2.0,11.0,91.0,113.0,12006.0,55398.815
3,11,1,59,2,2.0,10.0,80.0,110.0,11529.0,31055.867
3,12,1,59,2,2.0,14.0,83.0,115.0,24072.0,52007.026
3,13,1,59,2,3.0,14.0,93.0,176.0,11745.0,41867.294
3,14,1,59,2,2.0,11.0,82.0,102.0,13706.0,38772.484
3,15,1,59,2,2.0,12.0,96.0,150.0,11525.0,36488.115
3,16,1,59,2,2.0,10.0,81.0,102.0,12155.0,39993.704
3,17,1,59,2,2.0,13.0,91.0,146.0,11653.0,36475.924
3,18,1,59,2,2.0,10.0,80.0,101.0,11518.0,39777.596
3,19,1,59,2,2.0,10.0,101.0,121.0,11667.0,41069.623
3,20,1,59,2,3.0,13.0,84.0,101.0,11793.0,46715.125
3,21,1,59,2,2.0,10.0,80.0,102.0,11679.0,33787.161
3,22,1,59,2,3.0,12.0,84.0,101.0,12044.0,38678.42
3,23,1,59,2,1.0,10.0,83.0,104.0,11595.0,48509.164
3,24,1,59,2,9.0,21.0,83.0,101.0,11651.0,47742.523
3,0,2,59,2,2.0,10.0,104.0,99.0,11694.0,38534.001
3,1,2,59,2,3.0,16.0,110.0,99.0,11331.0,48503.144
3,2,2,59,2,2.0,9.0,101.0,90.0,11820.0,41617.356
3,3,2,59,2,2.0,10.0,100.0,89.0,11434.0,44933.922
3,4,2,59,2,2.0,10.0,100.0,93.0,11710.0,12557.208
3,5,2,59,2,2.0,10.0,100.0,98.0,11409.0,42449.297
3,6,2,59,2,3.0,14.0,120.0,97.0,11310.0,44542.855
3,7,2,59,2,2.0,10.0,99.0,89.0,11428.0,41395.051
3,8,2,59,2,2.0,12.0,132.0,116.0,11426.0,41949.252
3,9,2,59,2,2.0,11.0,102.0,100.0,11984.0,47236.943
3,10,2,59,2,5.0,19.0,118.0,111.0,11439.0,46088.369
3,11,2,59,2,2.0,12.0,103.0,118.0,11526.0,47843.004
3,12,2,59,2,2.0,10.0,102.0,92.0,11740.0,46583.019
3,13,2,59,2,3.0,12.0,104.0,91.0,11370.0,41554.866
3,14,2,59,2,2.0,9.0,106.0,92.0,11803.0,48193.309
3,15,2,59,2,2.0,9.0,101.0,89.0,11394.0,47055.819
3,16,2,59,2,2.0,9.0,98.0,88.0,11773.0,47442.045
3,17,2,59,2,2.0,9.0,135.0,110.0,11442.0,49653.952
3,18,2,59,2,3.0,12.0,106.0,94.0,11357.0,45908.423
3,19,2,59,2,2.0,10.0,110.0,97.0,11415.0,48238.151
3,20,2,59,2,2.0,10.0,100.0,90.0,11336.0,12516.232
3,21,2,59,2,2.0,10.0,105.0,98.0,11710.0,41987.27
3,22,2,59,2,2.0,12.0,118.0,130.0,11333.0,38972.874
3,23,2,59,2,2.0,13.0,141.0,93.0,11409.0,43907.567
3,24,2,59,2,1.0,10.0,98.0,88.0,11379.0,38256.827
\ No newline at end of file
if (!require("pacman"))
install.packages("pacman")
pacman::p_load(
stringr,
ggplot2,
reshape2,
tikzDevice,
R.devices,
gridExtra,
plyr,
ggallin,
formattable,
grid,
gtable,
tidyverse
)
pacman::p_load(stringr, ggplot2, reshape2, tikzDevice, R.devices, gridExtra)
pacman::p_load(plyr, ggallin, formattable, grid, gtable, tidyverse)
options(tz = "Europe/Amsterdam")
source("stats.R")
source("plots.R")
# Load clean results
results <- rbind(
get_results(1, "results1-wrong.csv"),
get_results(5, "results5-wrong.csv"),
get_results(10, "results10-wrong.csv")
)
results <- rbind(
get_results(1, "results1-new.csv"),
get_results(2, "results2-new.csv")
)
results <- rbind(
get_results(1, "results1.csv"),
get_results(2, "results2.csv"),
get_results(5, "results5.csv")
get_results(1, "results1.csv", 1),
get_results(2, "results2.csv", 0.6),
get_results(5, "results5.csv", 0.75),
get_results(10, "results10.csv", 0.6)
)
results <- get_results(5, "test.csv")
# All queries
stats <- get_stats(results)
# Print plots to the screen
diff_plan <- diff_plan_time()
stacked <- stacked_means()
abs1 <- box_db_query_absolute_log(1)
rel1 <- box_db_query_relative(1)
abs2 <- box_db_query_absolute_log(2)
rel2 <- box_db_query_relative(2)
abs5 <- box_db_query_absolute_log(5)
abs10 <- box_db_query_absolute_log(10)
rel1 <- box_db_query_relative(1)
rel2 <- box_db_query_relative(2)
rel5 <- box_db_query_relative(5)
rel10 <- box_db_query_relative(10)
grid.arrange(abs1, rel1, abs2, rel2, abs5, rel5, diff_plan, stacked, nrow = 4, ncol = 2)
grid.arrange(stacked)
grid.arrange(diff_plan)
grid.arrange(abs1, abs2, abs5, abs10, rel1, rel2, rel5, rel10, nrow = 2)
# Save all graphs to individual tex files
save_half("planning_time_joins-2.tex", diff_plan_time)
save_half("diff_execution_time_log-2.tex", box_db_query_absolute_log)
save_half("rel_diff_execution_time-2.tex", box_db_query_relative)
save_half("stacked_means-2.tex", stacked_means)
tikz(file = file.path("output", "planning_time_joins-3.tex"), width = 2.2, height = 2.2)
diff_plan_time()
dev.off()
tikz(file = file.path("output", "diff_execution_time_log-3.tex"), width = 2.2, height = 2.2)
box_db_query_absolute_log(1)
dev.off()
tikz(file = file.path("output", "rel_diff_execution_time-3.tex"), width = 2.2, height = 2.2)
box_db_query_relative(1)
dev.off()
save_third("planning_time_joins-3.tex", diff_plan_time)
save_third("diff_execution_time_log-3.tex", function() { box_db_query_absolute_log(1) })
save_third("rel_diff_execution_time-3.tex", function() { box_db_query_relative(1) })
save_to_tex("stacked_means-3.tex", stacked_means, 3.3, 2.2)
tikz(file = file.path("output", "stacked_means-3.tex"), width = 3.3, height = 2.2)
stacked_means()
dev.off()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
% Created by tikzDevice version 0.12.3.1 on 2020-09-08 11:21:57
% !TEX encoding = UTF-8 Unicode
\begin{tikzpicture}[x=1pt,y=1pt]
\definecolor{fillColor}{RGB}{255,255,255}
\path[use as bounding box,fill=fillColor,fill opacity=0.00] (0,0) rectangle (158.99,158.99);
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{255,255,255}
\definecolor{fillColor}{RGB}{255,255,255}
\path[draw=drawColor,line width= 0.6pt,line join=round,line cap=round,fill=fillColor] ( 0.00, -0.00) rectangle (158.99,158.99);
\end{scope}
\begin{scope}
\path[clip] ( 33.06, 25.92) rectangle (153.49,119.45);
\definecolor{fillColor}{RGB}{255,255,255}
\path[fill=fillColor] ( 33.06, 25.92) rectangle (153.49,119.45);
\definecolor{drawColor}{gray}{0.92}
\path[draw=drawColor,line width= 0.3pt,line join=round] ( 33.06, 37.84) --
(153.49, 37.84);
\path[draw=drawColor,line width= 0.3pt,line join=round] ( 33.06, 60.34) --
(153.49, 60.34);
\path[draw=drawColor,line width= 0.3pt,line join=round] ( 33.06, 82.84) --
(153.49, 82.84);
\path[draw=drawColor,line width= 0.3pt,line join=round] ( 33.06,105.34) --
(153.49,105.34);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 33.06, 26.59) --
(153.49, 26.59);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 33.06, 49.09) --
(153.49, 49.09);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 33.06, 71.59) --
(153.49, 71.59);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 33.06, 94.09) --
(153.49, 94.09);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 33.06,116.59) --
(153.49,116.59);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 46.96, 25.92) --
( 46.96,119.45);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 70.12, 25.92) --
( 70.12,119.45);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 93.28, 25.92) --
( 93.28,119.45);
\path[draw=drawColor,line width= 0.6pt,line join=round] (116.44, 25.92) --
(116.44,119.45);
\path[draw=drawColor,line width= 0.6pt,line join=round] (139.60, 25.92) --
(139.60,119.45);
\definecolor{drawColor}{RGB}{0,0,0}
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 46.96, 30.58) --
( 70.12, 30.17) --
( 93.28, 43.43) --
(116.44, 69.08) --
(139.60,113.71);
\path[draw=drawColor,line width= 0.6pt,dash pattern=on 2pt off 2pt ,line join=round] ( 46.96, 30.63) --
( 70.12, 30.30) --
( 93.28, 44.18) --
(116.44, 69.88) --
(139.60,115.20);
\definecolor{drawColor}{gray}{0.20}
\path[draw=drawColor,line width= 0.6pt,line join=round,line cap=round] ( 33.06, 25.92) rectangle (153.49,119.45);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{gray}{0.30}
\node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 28.11, 24.39) {0};
\node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 28.11, 46.89) {500};
\node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 28.11, 69.39) {1000};
\node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 28.11, 91.89) {1500};
\node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 28.11,114.39) {2000};
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{gray}{0.20}
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 30.31, 26.59) --
( 33.06, 26.59);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 30.31, 49.09) --
( 33.06, 49.09);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 30.31, 71.59) --
( 33.06, 71.59);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 30.31, 94.09) --
( 33.06, 94.09);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 30.31,116.59) --
( 33.06,116.59);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{gray}{0.20}
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 46.96, 23.17) --
( 46.96, 25.92);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 70.12, 23.17) --
( 70.12, 25.92);
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 93.28, 23.17) --
( 93.28, 25.92);
\path[draw=drawColor,line width= 0.6pt,line join=round] (116.44, 23.17) --
(116.44, 25.92);
\path[draw=drawColor,line width= 0.6pt,line join=round] (139.60, 23.17) --
(139.60, 25.92);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{gray}{0.30}
\node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 46.96, 16.56) {2};
\node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 70.12, 16.56) {3};
\node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 93.28, 16.56) {4};
\node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 0.64] at (116.44, 16.56) {5};
\node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 0.64] at (139.60, 16.56) {7};
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{0,0,0}
\node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 0.80] at ( 93.28, 7.06) {Number of joins};
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{0,0,0}
\node[text=drawColor,rotate= 90.00,anchor=base,inner sep=0pt, outer sep=0pt, scale= 0.80] at ( 11.01, 72.68) {Absolute planning time (ms)};
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{fillColor}{RGB}{255,255,255}
\path[fill=fillColor] ( 34.45,130.45) rectangle (152.11,153.49);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{0,0,0}
\node[text=drawColor,anchor=base west,inner sep=0pt, outer sep=0pt, scale= 0.80] at ( 39.95,139.22) {Variant};
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{fillColor}{RGB}{255,255,255}
\path[fill=fillColor] ( 69.96,135.95) rectangle ( 82.01,147.99);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{0,0,0}
\path[draw=drawColor,line width= 0.6pt,line join=round] ( 71.17,141.97) -- ( 80.80,141.97);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{fillColor}{RGB}{255,255,255}
\path[fill=fillColor] (110.71,135.95) rectangle (122.76,147.99);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{0,0,0}
\path[draw=drawColor,line width= 0.6pt,dash pattern=on 2pt off 2pt ,line join=round] (111.92,141.97) -- (121.55,141.97);
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{0,0,0}
\node[text=drawColor,anchor=base west,inner sep=0pt, outer sep=0pt, scale= 0.64] at ( 86.01,139.77) {Default};
\end{scope}
\begin{scope}
\path[clip] ( 0.00, 0.00) rectangle (158.99,158.99);
\definecolor{drawColor}{RGB}{0,0,0}
\node[text=drawColor,anchor=base west,inner sep=0pt, outer sep=0pt, scale= 0.64] at (126.76,139.77) {sec-RA};
\end{scope}
\end{tikzpicture}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment