ARTEMIS-3830 add index on filename to large_messages
This commit is contained in:
parent
efedff31bd
commit
bf8e075ee7
|
@ -119,8 +119,11 @@ public class PropertySQLProvider implements SQLProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCreateFileTableSQL() {
|
public String[] getCreateFileTableSQL() {
|
||||||
return format(sql("create-file-table"), tableName);
|
return new String[] {
|
||||||
|
format(sql("create-file-table"), tableName),
|
||||||
|
format(sql("create-file-index"), tableName)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@ public interface SQLProvider {
|
||||||
|
|
||||||
String getTableName();
|
String getTableName();
|
||||||
|
|
||||||
String getCreateFileTableSQL();
|
String[] getCreateFileTableSQL();
|
||||||
|
|
||||||
String getInsertFileSQL();
|
String getInsertFileSQL();
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
# Generic SQL statements
|
# Generic SQL statements
|
||||||
|
|
||||||
create-file-table=CREATE TABLE %s (ID BIGINT AUTO_INCREMENT, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
|
create-file-table=CREATE TABLE %s (ID BIGINT AUTO_INCREMENT, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
|
||||||
|
create-file-index=CREATE INDEX %1$s_IDX ON %1$s (fileName)
|
||||||
insert-file=INSERT INTO %s (FILENAME, EXTENSION, DATA) VALUES (?,?,?)
|
insert-file=INSERT INTO %s (FILENAME, EXTENSION, DATA) VALUES (?,?,?)
|
||||||
select-filenames-by-extension=SELECT FILENAME, ID FROM %s WHERE EXTENSION=?
|
select-filenames-by-extension=SELECT FILENAME, ID FROM %s WHERE EXTENSION=?
|
||||||
select-file-by-filename=SELECT ID, FILENAME, EXTENSION, DATA FROM %s WHERE fileName=?
|
select-file-by-filename=SELECT ID, FILENAME, EXTENSION FROM %s WHERE fileName=?
|
||||||
append-to-file=SELECT DATA FROM %s WHERE ID=? FOR UPDATE
|
append-to-file=SELECT DATA FROM %s WHERE ID=? FOR UPDATE
|
||||||
read-large-object=SELECT DATA FROM %s WHERE ID=?
|
read-large-object=SELECT DATA FROM %s WHERE ID=?
|
||||||
delete-file=DELETE FROM %s WHERE ID=?
|
delete-file=DELETE FROM %s WHERE ID=?
|
||||||
|
|
Loading…
Reference in New Issue