Added chat_reference index to speed up searches.

This commit is contained in:
CalDescent 2023-01-02 17:47:36 +00:00
parent cecf28ab7b
commit b0486f44bb

View File

@ -984,6 +984,8 @@ public class HSQLDBDatabaseUpdates {
// Add a chat reference, to allow one message to reference another, and for this to be easily
// searchable. Null values are allowed as most transactions won't have a reference.
stmt.execute("ALTER TABLE ChatTransactions ADD chat_reference Signature");
// For finding chat messages by reference
stmt.execute("CREATE INDEX ChatTransactionsChatReferenceIndex ON ChatTransactions (chat_reference)");
break;
default: