Create index on "last_modified_at" column in "sp_target" table. (#1015)

* Create index on "last_modified_at" column in "sp_target" table.
* Added tenant to the index.

Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
This commit is contained in:
Sergey Gerasimov
2020-10-13 17:06:43 +02:00
committed by GitHub
parent 541a0129ef
commit 99c8725b70
6 changed files with 8 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ import org.slf4j.LoggerFactory;
@Index(name = "sp_idx_target_01", columnList = "tenant,name,assigned_distribution_set"),
@Index(name = "sp_idx_target_03", columnList = "tenant,controller_id,assigned_distribution_set"),
@Index(name = "sp_idx_target_04", columnList = "tenant,created_at"),
@Index(name = "sp_idx_target_05", columnList = "tenant,last_modified_at"),
@Index(name = "sp_idx_target_prim", columnList = "tenant,id") }, uniqueConstraints = @UniqueConstraint(columnNames = {
"controller_id", "tenant" }, name = "uk_tenant_controller_id"))
// exception squid:S2160 - BaseEntity equals/hashcode is handling correctly for

View File

@@ -0,0 +1 @@
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);

View File

@@ -0,0 +1 @@
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);

View File

@@ -0,0 +1 @@
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);

View File

@@ -0,0 +1,3 @@
CREATE INDEX sp_idx_target_05
ON sp_target
USING BTREE (tenant, last_modified_at);

View File

@@ -0,0 +1 @@
CREATE INDEX sp_idx_target_05 ON sp_target (tenant, last_modified_at);