Skip to content
This repository was archived by the owner on Aug 23, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions config/tpcc_oracle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<parameters>
<!-- General Workload configuration -->
<dbtype>oracle</dbtype>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<DBUrl>jdbc:oracle:thin:@100.100.100.100:1521:orcl</DBUrl>
<DBName>tpcc</DBName>
<username>fake_user</username>
<password>fake_password</password>
<terminals>64</terminals>

<works>
<work>
<time>300</time>
<rate>unlimited</rate>
<weights>45,43,4,4,4</weights>
</work>
</works>

<!-- TPCC specific -->
<scalefactor>16</scalefactor>
<dialect>config/dialects/tpcc_dialects.xml</dialect>
<isolation>TRANSACTION_READ_COMMITTED</isolation>
<transactiontypes>
<transactiontype>
<name>NewOrder</name>
<id>1</id>
</transactiontype>
<transactiontype>
<name>Payment</name>
<id>2</id>
</transactiontype>
<transactiontype>
<name>OrderStatus</name>
<id>3</id>
</transactiontype>
<transactiontype>
<name>Delivery</name>
<id>4</id>
</transactiontype>
<transactiontype>
<name>StockLevel</name>
<id>5</id>
</transactiontype>
</transactiontypes>
</parameters>
142 changes: 142 additions & 0 deletions config/tpch_oracle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<dbtype>oracle</dbtype>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<DBUrl>jdbc:oracle:thin:@100.100.100.100:1521:orcl</DBUrl>
<username>fake_user</username>
<password>fake_password</password>
<isolation>TRANSACTION_READ_COMMITTED</isolation>

<!-- Location for the files generated by tpch dbgen -->
<datadir>data/tpch1</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>20</scalefactor>

<!-- The workload -->
<terminals>1</terminals>
<works>
<work>
<serial>true</serial>
<rate>unlimited</rate>
<weights>all</weights>
</work>
<work>
<serial>true</serial>
<rate>unlimited</rate>
<weights>even</weights>
</work>
<work>
<serial>true</serial>
<rate>unlimited</rate>
<weights>odd</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>
48 changes: 48 additions & 0 deletions config/wiki_oracle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<dbtype>oracle</dbtype>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<DBUrl>jdbc:oracle:thin:@100.100.100.100:1521:orcl</DBUrl>
<username>fake_user</username>
<password>fake_password</password>
<isolation>TRANSACTION_READ_COMMITTED</isolation>

<!-- Scale factor is the number of wikipages *1000 -->
<scalefactor>100</scalefactor>

<!-- Wikipedia Trace Options -->
<tracefile>config/traces/wikipedia-100k.trace</tracefile>
<traceOut>10</traceOut>
<base_ip>10.1.</base_ip>

<!-- The workload -->
<terminals>64</terminals>
<works>
<work>
<time>300</time>
<rate>unlimited</rate>
<weights>0.07,0.07,7.6725,91.2656,0.9219</weights>
</work>
</works>

<!-- Wikipedia Procedures Declaration -->
<transactiontypes>
<transactiontype>
<name>AddWatchList</name>
</transactiontype>
<transactiontype>
<name>RemoveWatchList</name>
</transactiontype>
<transactiontype>
<name>UpdatePage</name>
</transactiontype>
<transactiontype>
<name>GetPageAnonymous</name>
</transactiontype>
<transactiontype>
<name>GetPageAuthenticated</name>
</transactiontype>
</transactiontypes>
</parameters>
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@
<artifactId>openjpa-persistence-jdbc</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
Expand Down
77 changes: 77 additions & 0 deletions src/com/oltpbenchmark/benchmarks/tpch/ddls/tpch-oracle-ddl.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
BEGIN EXECUTE IMMEDIATE 'DROP TABLE nation CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;
BEGIN EXECUTE IMMEDIATE 'DROP TABLE region CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;
BEGIN EXECUTE IMMEDIATE 'DROP TABLE part CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;
BEGIN EXECUTE IMMEDIATE 'DROP TABLE supplier CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;
BEGIN EXECUTE IMMEDIATE 'DROP TABLE partsupp CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;
BEGIN EXECUTE IMMEDIATE 'DROP TABLE orders CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;
BEGIN EXECUTE IMMEDIATE 'DROP TABLE customer CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;
BEGIN EXECUTE IMMEDIATE 'DROP TABLE lineitem CASCADE CONSTRAINTS PURGE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END;;

CREATE TABLE nation ( n_nationkey INTEGER NOT NULL,
n_name CHAR(25) NOT NULL,
n_regionkey INTEGER NOT NULL,
n_comment VARCHAR(152));

CREATE TABLE region ( r_regionkey INTEGER NOT NULL,
r_name CHAR(25) NOT NULL,
r_comment VARCHAR(152));

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 );

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);

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 );

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);

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);

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);
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
create unique index c_ck on customer (c_custkey asc) ;
create index c_nk on customer (c_nationkey asc) ;
create unique index p_pk on part (p_partkey asc) ;
create unique index s_sk on supplier (s_suppkey asc) ;
create index s_nk on supplier (s_nationkey asc) ;
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 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 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_ln on lineitem (l_linenumber 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 unique index l_ok_ln on lineitem (l_orderkey asc, l_linenumber asc) ;
--create unique index l_ln_ok on lineitem (l_linenumber asc, l_orderkey 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) ;
create unique index n_nk on nation (n_nationkey asc) ;
create index n_rk on nation (n_regionkey asc) ;
create unique index r_rk on region (r_regionkey asc) ;