Skip to content

Commit

Permalink
Add new indexes to improve booking performance (#1304)
Browse files Browse the repository at this point in the history
* Add new indexes to improve booking performance

After the changes on the gpu PR #924
the performance of the booking query degraded up to 4 times the previous
throughput. Creating some indexes for columns that changed names seems to
have fixed the problem.

Signed-off-by: Diego Tavares <[email protected]>

* Update cuebot/src/main/resources/conf/ddl/postgres/migrations/V18_Add_New_Indexes

Signed-off-by: Diego Tavares da Silva <[email protected]>

* Update cuebot/src/main/resources/conf/ddl/postgres/migrations/V18_Add_New_Indexes

Signed-off-by: Diego Tavares da Silva <[email protected]>

* Update cuebot/src/main/resources/conf/ddl/postgres/migrations/V18_Add_New_Indexes

Signed-off-by: Diego Tavares da Silva <[email protected]>

---------

Signed-off-by: Diego Tavares <[email protected]>
Signed-off-by: Diego Tavares da Silva <[email protected]>
  • Loading branch information
DiegoTavares authored Jan 30, 2024
1 parent 9b4f90f commit 42542c1
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

--Performance issue, Created new index on column int_gpus_min


CREATE INDEX IF NOT EXISTS i_layer_int_gpu_mem_min
ON public.layer USING btree
(int_gpus_min ASC NULLS LAST)
TABLESPACE pg_default;


CREATE INDEX IF NOT EXISTS i_layer_int_gpu_mem_min_1
ON public.layer USING btree
(int_gpu_min ASC NULLS LAST)
TABLESPACE pg_default;


create index concurrently i_layer_int_cores_max on layer(int_cores_max);

create index concurrently i_job_resource_int_priority on job_resource(int_priority);

create index concurrently i_job_int_min_cores on job(int_min_cores);

create index concurrently i_layer_limit_pk_layer on layer_limit(pk_layer);

create index concurrently i_folder_resource_int_cores on folder_resource(int_cores);

create index concurrently i_job_ts_updated on job(ts_updated);

create index concurrently i_layer_str_tags on layer(str_tags);

0 comments on commit 42542c1

Please sign in to comment.