AMQ-6057: Add performance patch to JDBC statements definition

This commit is contained in:
Benjamin Graf 2016-11-15 17:01:34 +01:00 committed by Claus Ibsen
parent 2a56c6037d
commit 8bc3ee29cd
1 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ public class Statements {
if (createSchemaStatements == null) {
createSchemaStatements = new String[] {
"CREATE TABLE " + getFullMessageTableName() + "(" + "ID " + sequenceDataType + " NOT NULL"
+ ", CONTAINER " + containerNameDataType + ", MSGID_PROD " + msgIdDataType + ", MSGID_SEQ "
+ ", CONTAINER " + containerNameDataType + " NOT NULL, MSGID_PROD " + msgIdDataType + ", MSGID_SEQ "
+ sequenceDataType + ", EXPIRATION " + longDataType + ", MSG "
+ (useExternalMessageReferences ? stringIdDataType : binaryDataType)
+ ", PRIMARY KEY ( ID ) )",
@ -390,7 +390,7 @@ public class Statements {
public String getFindAllDestinationsStatement() {
if (findAllDestinationsStatement == null) {
findAllDestinationsStatement = "SELECT DISTINCT CONTAINER FROM " + getFullMessageTableName()
+ " UNION SELECT DISTINCT CONTAINER FROM " + getFullAckTableName();
+ " WHERE CONTAINER IS NOT NULL UNION SELECT DISTINCT CONTAINER FROM " + getFullAckTableName();
}
return findAllDestinationsStatement;
}
@ -991,4 +991,4 @@ public class Statements {
public void setLeaseOwnerStatement(String leaseOwnerStatement) {
this.leaseOwnerStatement = leaseOwnerStatement;
}
}
}