[
https://issues.apache.org/jira/browse/ARTEMIS-852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15670487#comment-15670487
]
ASF GitHub Bot commented on ARTEMIS-852:
----------------------------------------
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/889#discussion_r88242343
--- Diff:
artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java
---
@@ -36,8 +36,10 @@ private MySQLSQLProvider(String tName) {
"(ID INTEGER NOT NULL AUTO_INCREMENT," +
"FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA LONGBLOB,
PRIMARY KEY(ID)) ENGINE=InnoDB;";
- createJournalTableSQL = "CREATE TABLE " + tableName +
- "(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId
BIGINT,userRecordType SMALLINT,variableSize INTEGER,record LONGBLOB,txDataSize
INTEGER,txData LONGBLOB,txCheckNoRecords INTEGER,seq BIGINT) ENGINE=InnoDB;";
+ createJournalTableSQL = new String[] {
+ "CREATE TABLE " + tableName + "(id BIGINT,recordType
SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize
INTEGER,record LONGBLOB,txDataSize INTEGER,txData LONGBLOB,txCheckNoRecords
INTEGER,seq BIGINT) ENGINE=InnoDB;",
+ "CREATE INDEX " + tableName + "_IDX ON " + tableName + " (id)"
--- End diff --
great idea to use arrays
> Add indices to tables from JDBC backend to increase performance
> ---------------------------------------------------------------
>
> Key: ARTEMIS-852
> URL: https://issues.apache.org/jira/browse/ARTEMIS-852
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 1.5.0
> Reporter: Benjamin Graf
> Priority: Blocker
> Fix For: 1.6.0
>
>
> Almost every query used in Artemis uses where clauses but BINDINGS_TABLE and
> MESSAGE_TABLE actually have no indices. This causes performance impact.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)