ARTEMIS-2465 [JDBC-STORE] Adding index on txId

This commit is contained in:
Francesco Nigro 2019-08-28 16:45:41 +02:00 committed by Clebert Suconic
parent 0a0b0fcb23
commit fb01bc5644
2 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,7 @@ public class PropertySQLProvider implements SQLProvider {
return new String[] {
format(sql("create-journal-table"), tableName),
format(sql("create-journal-index"), tableName),
format(sql("create-journal-tx-index"), tableName)
};
}

View File

@ -30,6 +30,7 @@ copy-file-record-by-id=UPDATE %1$s SET DATA = (SELECT DATA FROM %1$s WHERE ID=?)
drop-table=DROP TABLE %s
create-journal-table=CREATE TABLE %s(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize INTEGER,record BLOB,txDataSize INTEGER,txData BLOB,txCheckNoRecords INTEGER,seq BIGINT NOT NULL, PRIMARY KEY(seq))
create-journal-index=CREATE INDEX %1$s_IDX ON %1$s (id)
create-journal-tx-index=CREATE INDEX %1$s_TX_IDX ON %1$s (txId)
insert-journal-record=INSERT INTO %s(id,recordType,compactCount,txId,userRecordType,variableSize,record,txDataSize,txData,txCheckNoRecords,seq) VALUES (?,?,?,?,?,?,?,?,?,?,?)
select-journal-record=SELECT id,recordType,compactCount,txId,userRecordType,variableSize,record,txDataSize,txData,txCheckNoRecords,seq FROM %s ORDER BY seq ASC
delete-journal-record=DELETE FROM %s WHERE id = ?