-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More versions of by name for benchmarking
- Loading branch information
Tiemo Bang
committed
Jul 12, 2024
1 parent
2cb8cb0
commit 520820c
Showing
25 changed files
with
5,863 additions
and
611 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.5 KB
incremental_transactions/tpcc/graphs/byname_sql_constargs_inlined.rs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.7 KB
incremental_transactions/tpcc/graphs/byname_sql_incremental_constargs.rs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+82.6 KB
...mental_transactions/tpcc/graphs/byname_sql_incremental_constargs_inlined.rs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68.7 KB
...nsactions/tpcc/graphs/byname_sql_incremental_constargs_inlined_minimized.rs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
incremental_transactions/tpcc/handles/byname_sql_constargs.rs.handles.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(in_warehouse_static, in_warehouse, in_district_static, in_district_next_id, in_district_ytd, in_customer, in_transaction_parameters, out_cust_agg, out_cust_byname) |
1 change: 1 addition & 0 deletions
1
incremental_transactions/tpcc/handles/byname_sql_constargs_inlined.rs.handles.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(in_warehouse_static, in_warehouse, in_district_static, in_district_next_id, in_district_ytd, in_customer, in_transaction_parameters, out_cust_byname_inlined) |
1 change: 1 addition & 0 deletions
1
incremental_transactions/tpcc/handles/byname_sql_incremental_constargs.rs.handles.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(in_warehouse_static, in_warehouse, in_district_static, in_district_next_id, in_district_ytd, in_customer, in_transaction_parameters, out_cust_agg, out_cust_byname) |
1 change: 1 addition & 0 deletions
1
...emental_transactions/tpcc/handles/byname_sql_incremental_constargs_inlined.rs.handles.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(in_warehouse_static, in_warehouse, in_district_static, in_district_next_id, in_district_ytd, in_customer, in_transaction_parameters, out_cust_byname_inlined) |
1 change: 1 addition & 0 deletions
1
...ansactions/tpcc/handles/byname_sql_incremental_constargs_inlined_minimized.rs.handles.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(in_warehouse_static, in_warehouse, in_district_static, in_district_next_id, in_district_ytd, in_customer, in_transaction_parameters, out_cust_byname_inlined_minimized, out_cust_byname_inlined) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE VIEW cust_agg AS | ||
SELECT ARRAY_AGG((c_id + c_w_id + c_d_id) ORDER BY c_first) AS cust_array | ||
FROM (SELECT c.c_id, c.c_w_id, c.c_d_id, c.c_first | ||
FROM customer AS c | ||
WHERE c.c_last = 'lastname' | ||
AND c.c_d_id = 43 | ||
AND c.c_w_id = 44 | ||
ORDER BY c_first); | ||
|
||
CREATE VIEW cust_byname AS | ||
SELECT c.c_first, c.c_middle, c.c_id, | ||
c.c_street_1, c.c_street_2, c.c_city, c.c_state, c.c_zip, | ||
c.c_phone, c.c_credit, c.c_credit_lim, | ||
c.c_discount, c.c_balance, c.c_since | ||
FROM customer as c, | ||
cust_agg as a | ||
WHERE (c.c_id + c.c_w_id + c.c_d_id) = a.cust_array[(ARRAY_LENGTH(a.cust_array) / 2) + 1]; |
14 changes: 14 additions & 0 deletions
14
incremental_transactions/tpcc/sql/byname_constargs_inlined.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE VIEW cust_byname_inlined AS | ||
SELECT c.c_first, c.c_middle, c.c_id, | ||
c.c_street_1, c.c_street_2, c.c_city, c.c_state, c.c_zip, | ||
c.c_phone, c.c_credit, c.c_credit_lim, | ||
c.c_discount, c.c_balance, c.c_since | ||
FROM customer as c, | ||
(SELECT ARRAY_AGG((c_id + c_w_id + c_d_id) ORDER BY c_first) AS cust_array | ||
FROM (SELECT c.c_id, c.c_w_id, c.c_d_id, c.c_first | ||
FROM customer AS c | ||
WHERE c.c_last = 'lastname' | ||
AND c.c_d_id = 43 | ||
AND c.c_w_id = 44 | ||
ORDER BY c_first)) as a | ||
WHERE (c.c_id + c.c_w_id + c.c_d_id) = a.cust_array[(ARRAY_LENGTH(a.cust_array) / 2) + 1]; |
25 changes: 25 additions & 0 deletions
25
incremental_transactions/tpcc/sql/byname_constargs_inlined_minimized.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CREATE VIEW cust_byname_inlined_minimized AS | ||
SELECT a.cust_array[(ARRAY_LENGTH(a.cust_array) / 2) + 1] FROM | ||
(SELECT ARRAY_AGG((c_first) ORDER BY c_first) AS cust_array | ||
FROM (SELECT c.c_id, c.c_w_id, c.c_d_id, c.c_first | ||
FROM customer AS c | ||
WHERE c.c_last = 'lastname' | ||
AND c.c_d_id = 43 | ||
AND c.c_w_id = 44 | ||
ORDER BY c_first)) as a | ||
|
||
--CREATE VIEW cust_byname_inlined AS | ||
/* SELECT c.c_first, c.c_middle, c.c_id, | ||
c.c_street_1, c.c_street_2, c.c_city, c.c_state, c.c_zip, | ||
c.c_phone, c.c_credit, c.c_credit_lim, | ||
c.c_discount, c.c_balance, c.c_since | ||
FROM customer as c, | ||
(SELECT ARRAY_AGG((c_id + c_w_id + c_d_id) ORDER BY c_first) AS cust_array | ||
FROM (SELECT c.c_id, c.c_w_id, c.c_d_id, c.c_first | ||
FROM customer AS c | ||
WHERE c.c_last = 'lastname' | ||
AND c.c_d_id = 43 | ||
AND c.c_w_id = 44 | ||
ORDER BY c_first)) as a | ||
WHERE (c.c_id + c.c_w_id + c.c_d_id) = a.cust_array[(ARRAY_LENGTH(a.cust_array) / 2) + 1]; | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
EXEC SQL SELECT d_next_o_id INTO :o_id | ||
FROM district | ||
WHERE d_w_id=:w_id AND d_id=:d_id; | ||
EXEC SQL SELECT COUNT(DISTINCT (s_i_id)) INTO :stock_count | ||
FROM order_line, stock | ||
WHERE ol_w_id=:w_id AND | ||
ol_d_id=:d_id AND ol_o_id<:o_id AND | ||
ol_o_id>=:o_id-20 AND s_w_id=:w_id AND | ||
s_i_id=ol_i_id AND s_quantity < :threshold; | ||
*/ | ||
|
||
|
||
SELECT d_next_o_id AS o_id_max, d_next_o_id-20 AS o_id_min | ||
FROM district | ||
WHERE d_w_id=:w_id AND d_id=:d_id; | ||
|
||
CREATE VIEW stock_level_district AS | ||
SELECT COUNT(DISTINCT (s_i_id)) AS stock_count | ||
FROM order_line, stock | ||
WHERE ol_w_id=44 AND -- set warehouse here | ||
ol_d_id=43 AND ol_o_id<o_id_max AND -- set district here | ||
ol_o_id>=o_id_min AND s_w_id=44 AND -- set warehouse here | ||
s_i_id=ol_i_id AND s_quantity < 100; -- set threshold here |
Oops, something went wrong.