-
Notifications
You must be signed in to change notification settings - Fork 206
Add TPC-H support for SQL Server #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6006ab8
Add TPC-H support for SQL Server
jcamachor ce05a7e
Merge branch 'main' into tpch_sqlserver
apavlo 823ee1b
Addressing review comments
jcamachor a2b505f
Adding tests for MSSQL in Github actions (TPC-C and TPC-H)
bpkroth a8f71e8
Merge branch 'main' into tpch_sqlserver
apavlo b6efa53
Merge branch 'main' into tpch_sqlserver
apavlo 8b1d836
addressing comments in <https://github.com/cmu-db/benchbase/pull/147>
bpkroth 7919afc
switch to row store by default
bpkroth 1f2d647
fixup
bpkroth 6f74e0b
workaround a bug where benchbase doesn't parse trailing comments corr…
bpkroth 141fc70
backout a local testing change
bpkroth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,143 @@ | ||
| <?xml version="1.0"?> | ||
| <parameters> | ||
|
|
||
| <!-- Connection details --> | ||
| <type>SQLSERVER</type> | ||
| <driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver> | ||
| <url>jdbc:sqlserver://localhost:1433;encrypt=false;</url> | ||
| <username>benchuser01</username> | ||
| <password>P@ssw0rd</password> | ||
| <isolation>TRANSACTION_SERIALIZABLE</isolation> | ||
| <batchsize>128</batchsize> | ||
|
|
||
| <!-- Location for the files generated by tpch dbgen --> | ||
| <datadir>data/tpch-sf0.01</datadir> | ||
|
|
||
| <!-- Format of the files that contain the tpch data --> | ||
| <!-- Values: csv or tbl--> | ||
| <fileFormat>tbl</fileFormat> | ||
|
|
||
| <!-- This setting doesn't do anything here --> | ||
| <scalefactor>0.1</scalefactor> | ||
|
|
||
| <!-- The workload --> | ||
| <terminals>1</terminals> | ||
| <works> | ||
| <work> | ||
| <serial>true</serial> | ||
| <rate>unlimited</rate> | ||
| <weights>1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1</weights> | ||
| </work> | ||
| <work> | ||
| <serial>true</serial> | ||
| <rate>unlimited</rate> | ||
| <weights>0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1</weights> | ||
| </work> | ||
| <work> | ||
| <serial>true</serial> | ||
| <rate>unlimited</rate> | ||
| <weights>1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0</weights> | ||
| </work> | ||
| </works> | ||
|
|
||
| <transactiontypes> | ||
| <groupings> | ||
| <grouping> | ||
| <name>odd</name> | ||
| <weights>1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0</weights> | ||
| </grouping> | ||
| <grouping> | ||
| <name>even</name> | ||
| <weights>0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1</weights> | ||
| </grouping> | ||
| </groupings> | ||
| <transactiontype> | ||
| <name>Q1</name> | ||
| <id>1</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q2</name> | ||
| <id>2</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q3</name> | ||
| <id>3</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q4</name> | ||
| <id>4</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q5</name> | ||
| <id>5</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q6</name> | ||
| <id>6</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q7</name> | ||
| <id>7</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q8</name> | ||
| <id>8</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q9</name> | ||
| <id>9</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q10</name> | ||
| <id>10</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q11</name> | ||
| <id>11</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q12</name> | ||
| <id>12</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q13</name> | ||
| <id>13</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q14</name> | ||
| <id>14</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q15</name> | ||
| <id>15</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q16</name> | ||
| <id>16</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q17</name> | ||
| <id>17</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q18</name> | ||
| <id>18</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q19</name> | ||
| <id>19</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q20</name> | ||
| <id>20</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q21</name> | ||
| <id>21</id> | ||
| </transactiontype> | ||
| <transactiontype> | ||
| <name>Q22</name> | ||
| <id>22</id> | ||
| </transactiontype> | ||
| </transactiontypes> | ||
| </parameters> | ||
This file contains hidden or 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 hidden or 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 hidden or 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,132 @@ | ||
| DROP TABLE IF EXISTS lineitem; | ||
| DROP TABLE IF EXISTS orders; | ||
| DROP TABLE IF EXISTS customer; | ||
| DROP TABLE IF EXISTS partsupp; | ||
| DROP TABLE IF EXISTS part; | ||
| DROP TABLE IF EXISTS supplier; | ||
| DROP TABLE IF EXISTS nation; | ||
| DROP TABLE IF EXISTS region; | ||
|
|
||
| CREATE TABLE region ( | ||
| r_regionkey integer NOT NULL, | ||
| r_name char(25) NOT NULL, | ||
| r_comment varchar(152), | ||
| PRIMARY KEY (r_regionkey) | ||
| ); | ||
| CREATE UNIQUE INDEX r_rk ON region (r_regionkey ASC); | ||
|
|
||
| CREATE TABLE nation ( | ||
| n_nationkey integer NOT NULL, | ||
| n_name char(25) NOT NULL, | ||
| n_regionkey integer NOT NULL, | ||
| n_comment varchar(152), | ||
| PRIMARY KEY (n_nationkey), | ||
| FOREIGN KEY (n_regionkey) REFERENCES region (r_regionkey) | ||
| ); | ||
| CREATE UNIQUE INDEX n_nk ON nation (n_nationkey ASC); | ||
| CREATE INDEX n_rk ON nation (n_regionkey ASC); | ||
|
|
||
| CREATE TABLE part ( | ||
| p_partkey integer NOT NULL, | ||
| p_name varchar(55) NOT NULL, | ||
| p_mfgr char(25) NOT NULL, | ||
| p_brand char(10) NOT NULL, | ||
| p_type varchar(25) NOT NULL, | ||
| p_size integer NOT NULL, | ||
| p_container char(10) NOT NULL, | ||
| p_retailprice decimal(15, 2) NOT NULL, | ||
| p_comment varchar(23) NOT NULL, | ||
| PRIMARY KEY (p_partkey) | ||
| ); | ||
| CREATE UNIQUE INDEX p_pk ON part (p_partkey ASC); | ||
|
|
||
| CREATE TABLE supplier ( | ||
| s_suppkey integer NOT NULL, | ||
| s_name char(25) NOT NULL, | ||
| s_address varchar(40) NOT NULL, | ||
| s_nationkey integer NOT NULL, | ||
| s_phone char(15) NOT NULL, | ||
| s_acctbal decimal(15, 2) NOT NULL, | ||
| s_comment varchar(101) NOT NULL, | ||
| PRIMARY KEY (s_suppkey), | ||
| FOREIGN KEY (s_nationkey) REFERENCES nation (n_nationkey) | ||
| ); | ||
| CREATE UNIQUE INDEX s_sk ON supplier (s_suppkey ASC); | ||
| CREATE INDEX s_nk ON supplier (s_nationkey ASC); | ||
|
|
||
| CREATE TABLE partsupp ( | ||
| ps_partkey integer NOT NULL, | ||
| ps_suppkey integer NOT NULL, | ||
| ps_availqty integer NOT NULL, | ||
| ps_supplycost decimal(15, 2) NOT NULL, | ||
| ps_comment varchar(199) NOT NULL, | ||
| PRIMARY KEY (ps_partkey, ps_suppkey), | ||
| FOREIGN KEY (ps_partkey) REFERENCES part (p_partkey), | ||
| FOREIGN KEY (ps_suppkey) REFERENCES supplier (s_suppkey) | ||
| ); | ||
| CREATE INDEX ps_pk ON partsupp (ps_partkey ASC); | ||
| CREATE INDEX ps_sk ON partsupp (ps_suppkey ASC); | ||
| CREATE UNIQUE INDEX ps_pk_sk ON partsupp (ps_partkey ASC, ps_suppkey ASC); | ||
| CREATE UNIQUE INDEX ps_sk_pk ON partsupp (ps_suppkey ASC, ps_partkey ASC); | ||
|
|
||
| CREATE TABLE customer ( | ||
| c_custkey integer NOT NULL, | ||
| c_name varchar(25) NOT NULL, | ||
| c_address varchar(40) NOT NULL, | ||
| c_nationkey integer NOT NULL, | ||
| c_phone char(15) NOT NULL, | ||
| c_acctbal decimal(15, 2) NOT NULL, | ||
| c_mktsegment char(10) NOT NULL, | ||
| c_comment varchar(117) NOT NULL, | ||
| PRIMARY KEY (c_custkey), | ||
| FOREIGN KEY (c_nationkey) REFERENCES nation (n_nationkey) | ||
| ); | ||
| CREATE UNIQUE INDEX c_ck ON customer (c_custkey ASC); | ||
| CREATE INDEX c_nk ON customer (c_nationkey ASC); | ||
|
|
||
| CREATE TABLE orders ( | ||
| o_orderkey integer NOT NULL, | ||
| o_custkey integer NOT NULL, | ||
| o_orderstatus char(1) NOT NULL, | ||
| o_totalprice decimal(15, 2) NOT NULL, | ||
| o_orderdate date NOT NULL, | ||
| o_orderpriority char(15) NOT NULL, | ||
| o_clerk char(15) NOT NULL, | ||
| o_shippriority integer NOT NULL, | ||
| o_comment varchar(79) NOT NULL, | ||
| PRIMARY KEY (o_orderkey), | ||
| FOREIGN KEY (o_custkey) REFERENCES customer (c_custkey) | ||
| ); | ||
| CREATE UNIQUE INDEX o_ok ON orders (o_orderkey ASC); | ||
| CREATE INDEX o_ck ON orders (o_custkey ASC); | ||
| CREATE INDEX o_od ON orders (o_orderdate ASC); | ||
|
|
||
| CREATE TABLE lineitem ( | ||
| l_orderkey integer NOT NULL, | ||
| l_partkey integer NOT NULL, | ||
| l_suppkey integer NOT NULL, | ||
| l_linenumber integer NOT NULL, | ||
| l_quantity decimal(15, 2) NOT NULL, | ||
| l_extendedprice decimal(15, 2) NOT NULL, | ||
| l_discount decimal(15, 2) NOT NULL, | ||
| l_tax decimal(15, 2) NOT NULL, | ||
| l_returnflag char(1) NOT NULL, | ||
| l_linestatus char(1) NOT NULL, | ||
| l_shipdate date NOT NULL, | ||
| l_commitdate date NOT NULL, | ||
| l_receiptdate date NOT NULL, | ||
| l_shipinstruct char(25) NOT NULL, | ||
| l_shipmode char(10) NOT NULL, | ||
| l_comment varchar(44) NOT NULL, | ||
| PRIMARY KEY (l_orderkey, l_linenumber), | ||
| FOREIGN KEY (l_orderkey) REFERENCES orders (o_orderkey), | ||
| FOREIGN KEY (l_partkey, l_suppkey) REFERENCES partsupp (ps_partkey, ps_suppkey) | ||
| ); | ||
| CREATE INDEX l_ok ON lineitem (l_orderkey ASC); | ||
| CREATE INDEX l_pk ON lineitem (l_partkey ASC); | ||
| CREATE INDEX l_sk ON lineitem (l_suppkey ASC); | ||
| CREATE INDEX l_sd ON lineitem (l_shipdate ASC); | ||
| CREATE INDEX l_cd ON lineitem (l_commitdate ASC); | ||
| CREATE INDEX l_rd ON lineitem (l_receiptdate ASC); | ||
| CREATE INDEX l_pk_sk ON lineitem (l_partkey ASC, l_suppkey ASC); | ||
| CREATE INDEX l_sk_pk ON lineitem (l_suppkey ASC, l_partkey ASC); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.