1 | #include "benchmark_runner.hpp" |
2 | #include "compare_result.hpp" |
3 | #include "dsdgen.hpp" |
4 | #include "duckdb_benchmark_macro.hpp" |
5 | |
6 | using namespace duckdb; |
7 | using namespace std; |
8 | |
9 | #define SF 1 |
10 | |
11 | #define TPCDS_QUERY_BODY(QNR) \ |
12 | virtual void Load(DuckDBBenchmarkState *state) { \ |
13 | if (!BenchmarkRunner::TryLoadDatabase(state->db, "tpcds")) { \ |
14 | tpcds::dbgen(SF, state->db); \ |
15 | BenchmarkRunner::SaveDatabase(state->db, "tpcds"); \ |
16 | } \ |
17 | } \ |
18 | virtual string GetQuery() { \ |
19 | return tpcds::get_query(QNR); \ |
20 | } \ |
21 | virtual string VerifyResult(QueryResult *result) { \ |
22 | if (!result->success) { \ |
23 | return result->error; \ |
24 | } \ |
25 | return ""; /*return compare_csv(*result, tpch::get_answer(SF, QNR), \ |
26 | true); */ \ |
27 | } \ |
28 | virtual string BenchmarkInfo() { \ |
29 | return StringUtil::Format("TPC-DS Q%d SF%d: %s", QNR, SF, tpcds::get_query(QNR).c_str()); \ |
30 | } |
31 | |
32 | DUCKDB_BENCHMARK(DSQ001, "[tpcds-sf1]" ) |
33 | TPCDS_QUERY_BODY(1); |
34 | FINISH_BENCHMARK(DSQ001); |
35 | |
36 | DUCKDB_BENCHMARK(DSQ002, "[tpcds-sf1]" ) |
37 | TPCDS_QUERY_BODY(2); |
38 | FINISH_BENCHMARK(DSQ002); |
39 | |
40 | DUCKDB_BENCHMARK(DSQ003, "[tpcds-sf1]" ) |
41 | TPCDS_QUERY_BODY(3); |
42 | FINISH_BENCHMARK(DSQ003); |
43 | |
44 | DUCKDB_BENCHMARK(DSQ004, "[tpcds-sf1]" ) |
45 | TPCDS_QUERY_BODY(4); |
46 | FINISH_BENCHMARK(DSQ004); |
47 | |
48 | DUCKDB_BENCHMARK(DSQ005, "[tpcds-sf1]" ) |
49 | TPCDS_QUERY_BODY(5); |
50 | FINISH_BENCHMARK(DSQ005); |
51 | |
52 | DUCKDB_BENCHMARK(DSQ006, "[tpcds-sf1]" ) |
53 | TPCDS_QUERY_BODY(6); |
54 | FINISH_BENCHMARK(DSQ006); |
55 | |
56 | DUCKDB_BENCHMARK(DSQ007, "[tpcds-sf1]" ) |
57 | TPCDS_QUERY_BODY(7); |
58 | FINISH_BENCHMARK(DSQ007); |
59 | |
60 | DUCKDB_BENCHMARK(DSQ008, "[tpcds-sf1]" ) |
61 | TPCDS_QUERY_BODY(8); |
62 | FINISH_BENCHMARK(DSQ008); |
63 | |
64 | DUCKDB_BENCHMARK(DSQ009, "[tpcds-sf1]" ) |
65 | TPCDS_QUERY_BODY(9); |
66 | FINISH_BENCHMARK(DSQ009); |
67 | |
68 | DUCKDB_BENCHMARK(DSQ010, "[tpcds-sf1]" ) |
69 | TPCDS_QUERY_BODY(10); |
70 | FINISH_BENCHMARK(DSQ010); |
71 | |
72 | DUCKDB_BENCHMARK(DSQ011, "[tpcds-sf1]" ) |
73 | TPCDS_QUERY_BODY(11); |
74 | FINISH_BENCHMARK(DSQ011); |
75 | |
76 | DUCKDB_BENCHMARK(DSQ012, "[tpcds-sf1]" ) |
77 | TPCDS_QUERY_BODY(12); |
78 | FINISH_BENCHMARK(DSQ012); |
79 | |
80 | DUCKDB_BENCHMARK(DSQ013, "[tpcds-sf1]" ) |
81 | TPCDS_QUERY_BODY(13); |
82 | FINISH_BENCHMARK(DSQ013); |
83 | |
84 | DUCKDB_BENCHMARK(DSQ014, "[tpcds-sf1]" ) |
85 | TPCDS_QUERY_BODY(14); |
86 | FINISH_BENCHMARK(DSQ014); |
87 | |
88 | DUCKDB_BENCHMARK(DSQ015, "[tpcds-sf1]" ) |
89 | TPCDS_QUERY_BODY(15); |
90 | FINISH_BENCHMARK(DSQ015); |
91 | |
92 | DUCKDB_BENCHMARK(DSQ016, "[tpcds-sf1]" ) |
93 | TPCDS_QUERY_BODY(16); |
94 | FINISH_BENCHMARK(DSQ016); |
95 | |
96 | DUCKDB_BENCHMARK(DSQ017, "[tpcds-sf1]" ) |
97 | TPCDS_QUERY_BODY(17); |
98 | FINISH_BENCHMARK(DSQ017); |
99 | |
100 | DUCKDB_BENCHMARK(DSQ018, "[tpcds-sf1]" ) |
101 | TPCDS_QUERY_BODY(18); |
102 | FINISH_BENCHMARK(DSQ018); |
103 | |
104 | DUCKDB_BENCHMARK(DSQ019, "[tpcds-sf1]" ) |
105 | TPCDS_QUERY_BODY(19); |
106 | FINISH_BENCHMARK(DSQ019); |
107 | |
108 | DUCKDB_BENCHMARK(DSQ020, "[tpcds-sf1]" ) |
109 | TPCDS_QUERY_BODY(20); |
110 | FINISH_BENCHMARK(DSQ020); |
111 | |
112 | DUCKDB_BENCHMARK(DSQ021, "[tpcds-sf1]" ) |
113 | TPCDS_QUERY_BODY(21); |
114 | FINISH_BENCHMARK(DSQ021); |
115 | |
116 | DUCKDB_BENCHMARK(DSQ022, "[tpcds-sf1]" ) |
117 | TPCDS_QUERY_BODY(22); |
118 | FINISH_BENCHMARK(DSQ022); |
119 | |
120 | DUCKDB_BENCHMARK(DSQ023, "[tpcds-sf1]" ) |
121 | TPCDS_QUERY_BODY(23); |
122 | FINISH_BENCHMARK(DSQ023); |
123 | |
124 | DUCKDB_BENCHMARK(DSQ024, "[tpcds-sf1]" ) |
125 | TPCDS_QUERY_BODY(24); |
126 | FINISH_BENCHMARK(DSQ024); |
127 | |
128 | DUCKDB_BENCHMARK(DSQ025, "[tpcds-sf1]" ) |
129 | TPCDS_QUERY_BODY(25); |
130 | FINISH_BENCHMARK(DSQ025); |
131 | |
132 | DUCKDB_BENCHMARK(DSQ026, "[tpcds-sf1]" ) |
133 | TPCDS_QUERY_BODY(26); |
134 | FINISH_BENCHMARK(DSQ026); |
135 | |
136 | DUCKDB_BENCHMARK(DSQ027, "[tpcds-sf1]" ) |
137 | TPCDS_QUERY_BODY(27); |
138 | FINISH_BENCHMARK(DSQ027); |
139 | |
140 | DUCKDB_BENCHMARK(DSQ028, "[tpcds-sf1]" ) |
141 | TPCDS_QUERY_BODY(28); |
142 | FINISH_BENCHMARK(DSQ028); |
143 | |
144 | DUCKDB_BENCHMARK(DSQ029, "[tpcds-sf1]" ) |
145 | TPCDS_QUERY_BODY(29); |
146 | FINISH_BENCHMARK(DSQ029); |
147 | |
148 | DUCKDB_BENCHMARK(DSQ030, "[tpcds-sf1]" ) |
149 | TPCDS_QUERY_BODY(30); |
150 | FINISH_BENCHMARK(DSQ030); |
151 | |
152 | DUCKDB_BENCHMARK(DSQ031, "[tpcds-sf1]" ) |
153 | TPCDS_QUERY_BODY(31); |
154 | FINISH_BENCHMARK(DSQ031); |
155 | |
156 | DUCKDB_BENCHMARK(DSQ032, "[tpcds-sf1]" ) |
157 | TPCDS_QUERY_BODY(32); |
158 | FINISH_BENCHMARK(DSQ032); |
159 | |
160 | DUCKDB_BENCHMARK(DSQ033, "[tpcds-sf1]" ) |
161 | TPCDS_QUERY_BODY(33); |
162 | FINISH_BENCHMARK(DSQ033); |
163 | |
164 | DUCKDB_BENCHMARK(DSQ034, "[tpcds-sf1]" ) |
165 | TPCDS_QUERY_BODY(34); |
166 | FINISH_BENCHMARK(DSQ034); |
167 | |
168 | DUCKDB_BENCHMARK(DSQ035, "[tpcds-sf1]" ) |
169 | TPCDS_QUERY_BODY(35); |
170 | FINISH_BENCHMARK(DSQ035); |
171 | |
172 | DUCKDB_BENCHMARK(DSQ036, "[tpcds-sf1]" ) |
173 | TPCDS_QUERY_BODY(36); |
174 | FINISH_BENCHMARK(DSQ036); |
175 | |
176 | DUCKDB_BENCHMARK(DSQ037, "[tpcds-sf1]" ) |
177 | TPCDS_QUERY_BODY(37); |
178 | FINISH_BENCHMARK(DSQ037); |
179 | |
180 | DUCKDB_BENCHMARK(DSQ038, "[tpcds-sf1]" ) |
181 | TPCDS_QUERY_BODY(38); |
182 | FINISH_BENCHMARK(DSQ038); |
183 | |
184 | DUCKDB_BENCHMARK(DSQ039, "[tpcds-sf1]" ) |
185 | TPCDS_QUERY_BODY(39); |
186 | FINISH_BENCHMARK(DSQ039); |
187 | |
188 | DUCKDB_BENCHMARK(DSQ040, "[tpcds-sf1]" ) |
189 | TPCDS_QUERY_BODY(40); |
190 | FINISH_BENCHMARK(DSQ040); |
191 | |
192 | DUCKDB_BENCHMARK(DSQ041, "[tpcds-sf1]" ) |
193 | TPCDS_QUERY_BODY(41); |
194 | FINISH_BENCHMARK(DSQ041); |
195 | |
196 | DUCKDB_BENCHMARK(DSQ042, "[tpcds-sf1]" ) |
197 | TPCDS_QUERY_BODY(42); |
198 | FINISH_BENCHMARK(DSQ042); |
199 | |
200 | DUCKDB_BENCHMARK(DSQ043, "[tpcds-sf1]" ) |
201 | TPCDS_QUERY_BODY(43); |
202 | FINISH_BENCHMARK(DSQ043); |
203 | |
204 | DUCKDB_BENCHMARK(DSQ044, "[tpcds-sf1]" ) |
205 | TPCDS_QUERY_BODY(44); |
206 | FINISH_BENCHMARK(DSQ044); |
207 | |
208 | DUCKDB_BENCHMARK(DSQ045, "[tpcds-sf1]" ) |
209 | TPCDS_QUERY_BODY(45); |
210 | FINISH_BENCHMARK(DSQ045); |
211 | |
212 | DUCKDB_BENCHMARK(DSQ046, "[tpcds-sf1]" ) |
213 | TPCDS_QUERY_BODY(46); |
214 | FINISH_BENCHMARK(DSQ046); |
215 | |
216 | DUCKDB_BENCHMARK(DSQ047, "[tpcds-sf1]" ) |
217 | TPCDS_QUERY_BODY(47); |
218 | FINISH_BENCHMARK(DSQ047); |
219 | |
220 | DUCKDB_BENCHMARK(DSQ048, "[tpcds-sf1]" ) |
221 | TPCDS_QUERY_BODY(48); |
222 | FINISH_BENCHMARK(DSQ048); |
223 | |
224 | DUCKDB_BENCHMARK(DSQ049, "[tpcds-sf1]" ) |
225 | TPCDS_QUERY_BODY(49); |
226 | FINISH_BENCHMARK(DSQ049); |
227 | |
228 | DUCKDB_BENCHMARK(DSQ050, "[tpcds-sf1]" ) |
229 | TPCDS_QUERY_BODY(50); |
230 | FINISH_BENCHMARK(DSQ050); |
231 | |
232 | DUCKDB_BENCHMARK(DSQ051, "[tpcds-sf1]" ) |
233 | TPCDS_QUERY_BODY(51); |
234 | FINISH_BENCHMARK(DSQ051); |
235 | |
236 | DUCKDB_BENCHMARK(DSQ052, "[tpcds-sf1]" ) |
237 | TPCDS_QUERY_BODY(52); |
238 | FINISH_BENCHMARK(DSQ052); |
239 | |
240 | DUCKDB_BENCHMARK(DSQ053, "[tpcds-sf1]" ) |
241 | TPCDS_QUERY_BODY(53); |
242 | FINISH_BENCHMARK(DSQ053); |
243 | |
244 | DUCKDB_BENCHMARK(DSQ054, "[tpcds-sf1]" ) |
245 | TPCDS_QUERY_BODY(54); |
246 | FINISH_BENCHMARK(DSQ054); |
247 | |
248 | DUCKDB_BENCHMARK(DSQ055, "[tpcds-sf1]" ) |
249 | TPCDS_QUERY_BODY(55); |
250 | FINISH_BENCHMARK(DSQ055); |
251 | |
252 | DUCKDB_BENCHMARK(DSQ056, "[tpcds-sf1]" ) |
253 | TPCDS_QUERY_BODY(56); |
254 | FINISH_BENCHMARK(DSQ056); |
255 | |
256 | DUCKDB_BENCHMARK(DSQ057, "[tpcds-sf1]" ) |
257 | TPCDS_QUERY_BODY(57); |
258 | FINISH_BENCHMARK(DSQ057); |
259 | |
260 | DUCKDB_BENCHMARK(DSQ058, "[tpcds-sf1]" ) |
261 | TPCDS_QUERY_BODY(58); |
262 | FINISH_BENCHMARK(DSQ058); |
263 | |
264 | DUCKDB_BENCHMARK(DSQ059, "[tpcds-sf1]" ) |
265 | TPCDS_QUERY_BODY(59); |
266 | FINISH_BENCHMARK(DSQ059); |
267 | |
268 | DUCKDB_BENCHMARK(DSQ060, "[tpcds-sf1]" ) |
269 | TPCDS_QUERY_BODY(60); |
270 | FINISH_BENCHMARK(DSQ060); |
271 | |
272 | DUCKDB_BENCHMARK(DSQ061, "[tpcds-sf1]" ) |
273 | TPCDS_QUERY_BODY(61); |
274 | FINISH_BENCHMARK(DSQ061); |
275 | |
276 | DUCKDB_BENCHMARK(DSQ062, "[tpcds-sf1]" ) |
277 | TPCDS_QUERY_BODY(62); |
278 | FINISH_BENCHMARK(DSQ062); |
279 | |
280 | DUCKDB_BENCHMARK(DSQ063, "[tpcds-sf1]" ) |
281 | TPCDS_QUERY_BODY(63); |
282 | FINISH_BENCHMARK(DSQ063); |
283 | |
284 | DUCKDB_BENCHMARK(DSQ064, "[tpcds-sf1]" ) |
285 | TPCDS_QUERY_BODY(64); |
286 | FINISH_BENCHMARK(DSQ064); |
287 | |
288 | DUCKDB_BENCHMARK(DSQ065, "[tpcds-sf1]" ) |
289 | TPCDS_QUERY_BODY(65); |
290 | FINISH_BENCHMARK(DSQ065); |
291 | |
292 | DUCKDB_BENCHMARK(DSQ066, "[tpcds-sf1]" ) |
293 | TPCDS_QUERY_BODY(66); |
294 | FINISH_BENCHMARK(DSQ066); |
295 | |
296 | DUCKDB_BENCHMARK(DSQ067, "[tpcds-sf1]" ) |
297 | TPCDS_QUERY_BODY(67); |
298 | FINISH_BENCHMARK(DSQ067); |
299 | |
300 | DUCKDB_BENCHMARK(DSQ068, "[tpcds-sf1]" ) |
301 | TPCDS_QUERY_BODY(68); |
302 | FINISH_BENCHMARK(DSQ068); |
303 | |
304 | DUCKDB_BENCHMARK(DSQ069, "[tpcds-sf1]" ) |
305 | TPCDS_QUERY_BODY(69); |
306 | FINISH_BENCHMARK(DSQ069); |
307 | |
308 | DUCKDB_BENCHMARK(DSQ070, "[tpcds-sf1]" ) |
309 | TPCDS_QUERY_BODY(70); |
310 | FINISH_BENCHMARK(DSQ070); |
311 | |
312 | DUCKDB_BENCHMARK(DSQ071, "[tpcds-sf1]" ) |
313 | TPCDS_QUERY_BODY(71); |
314 | FINISH_BENCHMARK(DSQ071); |
315 | |
316 | DUCKDB_BENCHMARK(DSQ072, "[tpcds-sf1]" ) |
317 | TPCDS_QUERY_BODY(72); |
318 | FINISH_BENCHMARK(DSQ072); |
319 | |
320 | DUCKDB_BENCHMARK(DSQ073, "[tpcds-sf1]" ) |
321 | TPCDS_QUERY_BODY(73); |
322 | FINISH_BENCHMARK(DSQ073); |
323 | |
324 | DUCKDB_BENCHMARK(DSQ074, "[tpcds-sf1]" ) |
325 | TPCDS_QUERY_BODY(74); |
326 | FINISH_BENCHMARK(DSQ074); |
327 | |
328 | DUCKDB_BENCHMARK(DSQ075, "[tpcds-sf1]" ) |
329 | TPCDS_QUERY_BODY(75); |
330 | FINISH_BENCHMARK(DSQ075); |
331 | |
332 | DUCKDB_BENCHMARK(DSQ076, "[tpcds-sf1]" ) |
333 | TPCDS_QUERY_BODY(76); |
334 | FINISH_BENCHMARK(DSQ076); |
335 | |
336 | DUCKDB_BENCHMARK(DSQ077, "[tpcds-sf1]" ) |
337 | TPCDS_QUERY_BODY(77); |
338 | FINISH_BENCHMARK(DSQ077); |
339 | |
340 | DUCKDB_BENCHMARK(DSQ078, "[tpcds-sf1]" ) |
341 | TPCDS_QUERY_BODY(78); |
342 | FINISH_BENCHMARK(DSQ078); |
343 | |
344 | DUCKDB_BENCHMARK(DSQ079, "[tpcds-sf1]" ) |
345 | TPCDS_QUERY_BODY(79); |
346 | FINISH_BENCHMARK(DSQ079); |
347 | |
348 | DUCKDB_BENCHMARK(DSQ080, "[tpcds-sf1]" ) |
349 | TPCDS_QUERY_BODY(80); |
350 | FINISH_BENCHMARK(DSQ080); |
351 | |
352 | DUCKDB_BENCHMARK(DSQ081, "[tpcds-sf1]" ) |
353 | TPCDS_QUERY_BODY(81); |
354 | FINISH_BENCHMARK(DSQ081); |
355 | |
356 | DUCKDB_BENCHMARK(DSQ082, "[tpcds-sf1]" ) |
357 | TPCDS_QUERY_BODY(82); |
358 | FINISH_BENCHMARK(DSQ082); |
359 | |
360 | DUCKDB_BENCHMARK(DSQ083, "[tpcds-sf1]" ) |
361 | TPCDS_QUERY_BODY(83); |
362 | FINISH_BENCHMARK(DSQ083); |
363 | |
364 | DUCKDB_BENCHMARK(DSQ084, "[tpcds-sf1]" ) |
365 | TPCDS_QUERY_BODY(84); |
366 | FINISH_BENCHMARK(DSQ084); |
367 | |
368 | DUCKDB_BENCHMARK(DSQ085, "[tpcds-sf1]" ) |
369 | TPCDS_QUERY_BODY(85); |
370 | FINISH_BENCHMARK(DSQ085); |
371 | |
372 | DUCKDB_BENCHMARK(DSQ086, "[tpcds-sf1]" ) |
373 | TPCDS_QUERY_BODY(86); |
374 | FINISH_BENCHMARK(DSQ086); |
375 | |
376 | DUCKDB_BENCHMARK(DSQ087, "[tpcds-sf1]" ) |
377 | TPCDS_QUERY_BODY(87); |
378 | FINISH_BENCHMARK(DSQ087); |
379 | |
380 | DUCKDB_BENCHMARK(DSQ088, "[tpcds-sf1]" ) |
381 | TPCDS_QUERY_BODY(88); |
382 | FINISH_BENCHMARK(DSQ088); |
383 | |
384 | DUCKDB_BENCHMARK(DSQ089, "[tpcds-sf1]" ) |
385 | TPCDS_QUERY_BODY(89); |
386 | FINISH_BENCHMARK(DSQ089); |
387 | |
388 | DUCKDB_BENCHMARK(DSQ090, "[tpcds-sf1]" ) |
389 | TPCDS_QUERY_BODY(90); |
390 | FINISH_BENCHMARK(DSQ090); |
391 | |
392 | DUCKDB_BENCHMARK(DSQ091, "[tpcds-sf1]" ) |
393 | TPCDS_QUERY_BODY(91); |
394 | FINISH_BENCHMARK(DSQ091); |
395 | |
396 | DUCKDB_BENCHMARK(DSQ092, "[tpcds-sf1]" ) |
397 | TPCDS_QUERY_BODY(92); |
398 | FINISH_BENCHMARK(DSQ092); |
399 | |
400 | DUCKDB_BENCHMARK(DSQ093, "[tpcds-sf1]" ) |
401 | TPCDS_QUERY_BODY(93); |
402 | FINISH_BENCHMARK(DSQ093); |
403 | |
404 | DUCKDB_BENCHMARK(DSQ094, "[tpcds-sf1]" ) |
405 | TPCDS_QUERY_BODY(94); |
406 | FINISH_BENCHMARK(DSQ094); |
407 | |
408 | DUCKDB_BENCHMARK(DSQ095, "[tpcds-sf1]" ) |
409 | TPCDS_QUERY_BODY(95); |
410 | FINISH_BENCHMARK(DSQ095); |
411 | |
412 | DUCKDB_BENCHMARK(DSQ096, "[tpcds-sf1]" ) |
413 | TPCDS_QUERY_BODY(96); |
414 | FINISH_BENCHMARK(DSQ096); |
415 | |
416 | DUCKDB_BENCHMARK(DSQ097, "[tpcds-sf1]" ) |
417 | TPCDS_QUERY_BODY(97); |
418 | FINISH_BENCHMARK(DSQ097); |
419 | |
420 | DUCKDB_BENCHMARK(DSQ098, "[tpcds-sf1]" ) |
421 | TPCDS_QUERY_BODY(98); |
422 | FINISH_BENCHMARK(DSQ098); |
423 | |
424 | DUCKDB_BENCHMARK(DSQ099, "[tpcds-sf1]" ) |
425 | TPCDS_QUERY_BODY(99); |
426 | FINISH_BENCHMARK(DSQ099); |
427 | |
428 | DUCKDB_BENCHMARK(DSQ100, "[tpcds-sf1]" ) |
429 | TPCDS_QUERY_BODY(100); |
430 | FINISH_BENCHMARK(DSQ100); |
431 | |
432 | DUCKDB_BENCHMARK(DSQ101, "[tpcds-sf1]" ) |
433 | TPCDS_QUERY_BODY(101); |
434 | FINISH_BENCHMARK(DSQ101); |
435 | |
436 | DUCKDB_BENCHMARK(DSQ102, "[tpcds-sf1]" ) |
437 | TPCDS_QUERY_BODY(102); |
438 | FINISH_BENCHMARK(DSQ102); |
439 | |
440 | DUCKDB_BENCHMARK(DSQ103, "[tpcds-sf1]" ) |
441 | TPCDS_QUERY_BODY(103); |
442 | FINISH_BENCHMARK(DSQ103); |
443 | |