#4134 indexes for standard_buildroot
Opened 8 months ago by mikem. Modified 8 months ago
mikem/koji buildroot-index  into  master

@@ -46,6 +46,13 @@ 

  

  INSERT INTO locks(name) VALUES('repo-queue');

  

+ -- https://pagure.io/koji/issue/3963

+ CREATE INDEX IF NOT EXISTS standard_buildroot_host_id on standard_buildroot(host_id);

+ CREATE INDEX IF NOT EXISTS standard_buildroot_repo_id on standard_buildroot(repo_id);

+ CREATE INDEX IF NOT EXISTS standard_buildroot_task_id on standard_buildroot(task_id);

+ CREATE INDEX IF NOT EXISTS standard_buildroot_create_event on standard_buildroot(create_event);

+ CREATE INDEX IF NOT EXISTS standard_buildroot_retire_event on standard_buildroot(retire_event);

+ 

  COMMIT;

  

  -- this must be outside the transaction block

file modified
+6
@@ -626,6 +626,12 @@ 

  	state INTEGER

  ) WITHOUT OIDS;

  

+ CREATE INDEX standard_buildroot_host_id on standard_buildroot(host_id);

+ CREATE INDEX standard_buildroot_repo_id on standard_buildroot(repo_id);

+ CREATE INDEX standard_buildroot_task_id on standard_buildroot(task_id);

+ CREATE INDEX standard_buildroot_create_event on standard_buildroot(create_event);

+ CREATE INDEX standard_buildroot_retire_event on standard_buildroot(retire_event);

+ 

  CREATE TABLE buildroot_tools_info (

  	buildroot_id INTEGER NOT NULL REFERENCES buildroot(id),

  	tool TEXT NOT NULL,