Skip to content

Commit 3e2aab2

Browse files
mbutrovichapavlo
andauthored
Remove redundant TPC-C index on Order. (#311)
Co-authored-by: Andy Pavlo <[email protected]>
1 parent b51c94b commit 3e2aab2

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

src/main/resources/benchmarks/tpcc/ddl-myrocks.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- TODO: C_SINCE ON UPDATE CURRENT_TIMESTAMP,
2-
-- Copied from mysql , except that MyRocks does not support foreign keys
2+
-- Copied from mysql , except that MyRocks does not support foreign keys
33

44
-- woonhak, turn off foreign key check, reference tpcc-mysql and tpcc specification
55
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
@@ -160,7 +160,7 @@ CREATE INDEX IDX_CUSTOMER_NAME ON CUSTOMER (C_W_ID,C_D_ID,C_LAST,C_FIRST);
160160

161161
-- already created
162162
-- CREATE INDEX IDX_CUSTOMER ON CUSTOMER (C_W_ID,C_D_ID,C_LAST,C_FIRST);
163-
CREATE INDEX IDX_ORDER ON OORDER (O_W_ID,O_D_ID,O_C_ID,O_ID);
163+
-- CREATE INDEX IDX_ORDER ON OORDER (O_W_ID,O_D_ID,O_C_ID,O_ID);
164164
-- tpcc-mysql create two indexes for the foreign key constraints, Is it really necessary?
165165
-- CREATE INDEX FKEY_STOCK_2 ON STOCK (S_I_ID);
166166
-- CREATE INDEX FKEY_ORDER_LINE_2 ON ORDER_LINE (OL_SUPPLY_W_ID,OL_I_ID);

src/main/resources/benchmarks/tpcc/ddl-mysql.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ CREATE TABLE order_line (
150150
);
151151

152152
CREATE INDEX idx_customer_name ON customer (c_w_id, c_d_id, c_last, c_first);
153-
CREATE INDEX idx_order ON oorder (o_w_id, o_d_id, o_c_id, o_id);
154153

155154
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
156155
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

src/main/resources/benchmarks/tpcc/ddl-noisepage.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,3 @@ CREATE TABLE order_line (
147147
);
148148

149149
CREATE INDEX idx_customer_name ON customer (c_w_id, c_d_id, c_last);
150-
CREATE INDEX idx_order ON oorder (o_w_id, o_d_id, o_c_id, o_id);

src/main/resources/benchmarks/tpcc/ddl-postgres.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,4 @@ CREATE TABLE order_line (
146146
PRIMARY KEY (ol_w_id, ol_d_id, ol_o_id, ol_number)
147147
);
148148

149-
CREATE INDEX idx_customer_name ON customer (c_w_id, c_d_id, c_last, c_first);
150-
CREATE INDEX idx_order ON oorder (o_w_id, o_d_id, o_c_id, o_id);
149+
CREATE INDEX idx_customer_name ON customer (c_w_id, c_d_id, c_last, c_first);

src/main/resources/benchmarks/tpcc/ddl-singlestore.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ CREATE INDEX IDX_CUSTOMER_NAME ON CUSTOMER (C_W_ID,C_D_ID,C_LAST,C_FIRST);
159159

160160
-- already created
161161
-- CREATE INDEX IDX_CUSTOMER ON CUSTOMER (C_W_ID,C_D_ID,C_LAST,C_FIRST);
162-
CREATE INDEX IDX_ORDER ON OORDER (O_W_ID,O_D_ID,O_C_ID,O_ID);
162+
-- CREATE INDEX IDX_ORDER ON OORDER (O_W_ID,O_D_ID,O_C_ID,O_ID);
163163
-- tpcc-mysql create two indexes for the foreign key constraints, Is it really necessary?
164164
-- CREATE INDEX FKEY_STOCK_2 ON STOCK (S_I_ID);
165165
-- CREATE INDEX FKEY_ORDER_LINE_2 ON ORDER_LINE (OL_SUPPLY_W_ID,OL_I_ID);

0 commit comments

Comments
 (0)