Mercurial > hg > orthanc-databases
changeset 716:951d2ef62f58 sql-opti
add index on AuditLog.sourcePlugin
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Mon, 11 Aug 2025 12:03:51 +0200 |
| parents | 7c0157bf749c |
| children | 579c1c1a2879 |
| files | PostgreSQL/Plugins/SQL/Downgrades/Rev6ToRev5.sql PostgreSQL/Plugins/SQL/PrepareIndex.sql |
| diffstat | 2 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/PostgreSQL/Plugins/SQL/Downgrades/Rev6ToRev5.sql Sun Aug 10 15:27:45 2025 +0200 +++ b/PostgreSQL/Plugins/SQL/Downgrades/Rev6ToRev5.sql Mon Aug 11 12:03:51 2025 +0200 @@ -239,6 +239,7 @@ DROP INDEX IF EXISTS AuditLogsUserId; DROP INDEX IF EXISTS AuditLogsResourceId; DROP INDEX IF EXISTS AuditLogsAction; +DROP INDEX IF EXISTS AuditLogsSourcePlugin; DROP TABLE IF EXISTS AuditLogs;
--- a/PostgreSQL/Plugins/SQL/PrepareIndex.sql Sun Aug 10 15:27:45 2025 +0200 +++ b/PostgreSQL/Plugins/SQL/PrepareIndex.sql Mon Aug 11 12:03:51 2025 +0200 @@ -837,6 +837,7 @@ CREATE INDEX IF NOT EXISTS AuditLogsUserId ON AuditLogs (userId); CREATE INDEX IF NOT EXISTS AuditLogsResourceId ON AuditLogs (resourceId); CREATE INDEX IF NOT EXISTS AuditLogsAction ON AuditLogs (action); +CREATE INDEX IF NOT EXISTS AuditLogsSourcePlugin ON AuditLogs (sourcePlugin);
