[ARVADOS] updated: 2.1.0-2199-gd9cae7452

Git user git at public.arvados.org
Fri Apr 1 20:47:20 UTC 2022


Summary of changes:
 .../20220401153101_fix_created_at_indexes.rb       |  28 ++--
 services/api/db/structure.sql                      | 148 ++++++++++++++-------
 2 files changed, 121 insertions(+), 55 deletions(-)

       via  d9cae745245c22e6b4acb0d2ab3f4f3c2afa81fa (commit)
       via  c3647ea9542ced1dfc9239c845f4b118b6743df0 (commit)
      from  f988449749c047bbf100e94dd2bb9285b08fa3c1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d9cae745245c22e6b4acb0d2ab3f4f3c2afa81fa
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Fri Apr 1 16:46:49 2022 -0400

    18943: consistency between modified_at/created_at indexes
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb b/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb
index 72de6aa4d..308e69c9b 100644
--- a/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb
+++ b/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb
@@ -8,24 +8,26 @@ class FixCreatedAtIndexes < ActiveRecord::Migration[5.2]
   def up
     @@idxtables.each do |table|
       ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at")
-      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at_uuid")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at_and_uuid")
       ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at")
       ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at_uuid")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at_and_uuid")
 
-      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_created_at_uuid ON #{table.to_s} USING btree  (created_at, uuid)")
-      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_modified_at_uuid ON #{table.to_s} USING btree (modified_at desc, uuid desc)")
+      ActiveRecord::Base.connection.execute("CREATE INDEX IF NOT EXISTS index_#{table.to_s}_on_created_at_and_uuid ON #{table.to_s} USING btree (created_at, uuid)")
+      ActiveRecord::Base.connection.execute("CREATE INDEX IF NOT EXISTS index_#{table.to_s}_on_modified_at_and_uuid ON #{table.to_s} USING btree (modified_at desc, uuid desc)")
     end
   end
 
   def down
     @@idxtables.each do |table|
       ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at")
-      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at_uuid")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at_and_uuid")
       ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at")
       ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at_uuid")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at_and_uuid")
 
-      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_created_at ON #{table.to_s} USING btree  (created_at)")
-      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_modified_at_uuid ON #{table.to_s} USING btree (modified_at desc, uuid asc)")
+      ActiveRecord::Base.connection.execute("CREATE INDEX IF NOT EXISTS index_#{table.to_s}_on_created_at_and_uuid ON #{table.to_s} USING btree (created_at, uuid)")
+      ActiveRecord::Base.connection.execute("CREATE INDEX IF NOT EXISTS index_#{table.to_s}_on_modified_at_uuid ON #{table.to_s} USING btree (modified_at desc, uuid asc)")
     end
   end
 end
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 9c08b81e0..8cb27ab4d 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -1940,10 +1940,10 @@ CREATE INDEX index_collections_on_is_trashed ON public.collections USING btree (
 
 
 --
--- Name: index_collections_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_collections_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_modified_at_uuid ON public.collections USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_collections_on_modified_at_and_uuid ON public.collections USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -1988,6 +1988,13 @@ CREATE UNIQUE INDEX index_collections_on_uuid ON public.collections USING btree
 CREATE INDEX index_container_requests_on_container_uuid ON public.container_requests USING btree (container_uuid);
 
 
+--
+-- Name: index_container_requests_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_container_requests_on_created_at_and_uuid ON public.container_requests USING btree (created_at, uuid);
+
+
 --
 -- Name: index_container_requests_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
@@ -1996,10 +2003,10 @@ CREATE INDEX index_container_requests_on_created_at_uuid ON public.container_req
 
 
 --
--- Name: index_container_requests_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_container_requests_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_container_requests_on_modified_at_uuid ON public.container_requests USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_container_requests_on_modified_at_and_uuid ON public.container_requests USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2136,10 +2143,10 @@ CREATE INDEX index_groups_on_is_trashed ON public.groups USING btree (is_trashed
 
 
 --
--- Name: index_groups_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_groups_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_groups_on_modified_at_uuid ON public.groups USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_groups_on_modified_at_and_uuid ON public.groups USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2388,10 +2395,10 @@ CREATE INDEX index_links_on_head_uuid ON public.links USING btree (head_uuid);
 
 
 --
--- Name: index_links_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_links_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_modified_at_uuid ON public.links USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_links_on_modified_at_and_uuid ON public.links USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2458,10 +2465,10 @@ CREATE INDEX index_logs_on_event_type ON public.logs USING btree (event_type);
 
 
 --
--- Name: index_logs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_logs_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_modified_at_uuid ON public.logs USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_logs_on_modified_at_and_uuid ON public.logs USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2611,6 +2618,13 @@ CREATE INDEX index_pipeline_templates_on_owner_uuid ON public.pipeline_templates
 CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON public.pipeline_templates USING btree (uuid);
 
 
+--
+-- Name: index_repositories_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_repositories_on_created_at_and_uuid ON public.repositories USING btree (created_at, uuid);
+
+
 --
 -- Name: index_repositories_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
@@ -2619,10 +2633,10 @@ CREATE INDEX index_repositories_on_created_at_uuid ON public.repositories USING
 
 
 --
--- Name: index_repositories_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_repositories_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_repositories_on_modified_at_uuid ON public.repositories USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_repositories_on_modified_at_and_uuid ON public.repositories USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2724,10 +2738,10 @@ CREATE UNIQUE INDEX index_users_on_identity_url ON public.users USING btree (ide
 
 
 --
--- Name: index_users_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_users_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_users_on_modified_at_uuid ON public.users USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_users_on_modified_at_and_uuid ON public.users USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2751,6 +2765,13 @@ CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (usernam
 CREATE UNIQUE INDEX index_users_on_uuid ON public.users USING btree (uuid);
 
 
+--
+-- Name: index_virtual_machines_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_virtual_machines_on_created_at_and_uuid ON public.virtual_machines USING btree (created_at, uuid);
+
+
 --
 -- Name: index_virtual_machines_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
@@ -2766,10 +2787,10 @@ CREATE INDEX index_virtual_machines_on_hostname ON public.virtual_machines USING
 
 
 --
--- Name: index_virtual_machines_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_virtual_machines_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_virtual_machines_on_modified_at_uuid ON public.virtual_machines USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_virtual_machines_on_modified_at_and_uuid ON public.virtual_machines USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2786,6 +2807,13 @@ CREATE INDEX index_virtual_machines_on_owner_uuid ON public.virtual_machines USI
 CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON public.virtual_machines USING btree (uuid);
 
 
+--
+-- Name: index_workflows_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_workflows_on_created_at_and_uuid ON public.workflows USING btree (created_at, uuid);
+
+
 --
 -- Name: index_workflows_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
@@ -2794,10 +2822,10 @@ CREATE INDEX index_workflows_on_created_at_uuid ON public.workflows USING btree
 
 
 --
--- Name: index_workflows_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_workflows_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_workflows_on_modified_at_uuid ON public.workflows USING btree (modified_at DESC, uuid DESC);
+CREATE INDEX index_workflows_on_modified_at_and_uuid ON public.workflows USING btree (modified_at DESC, uuid DESC);
 
 
 --

commit c3647ea9542ced1dfc9239c845f4b118b6743df0
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Fri Apr 1 16:36:39 2022 -0400

    18943: add modified_at descending index
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb b/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb
index 22d9b2879..72de6aa4d 100644
--- a/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb
+++ b/services/api/db/migrate/20220401153101_fix_created_at_indexes.rb
@@ -3,21 +3,29 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 class FixCreatedAtIndexes < ActiveRecord::Migration[5.2]
-  def tables
-    %w{collections links logs groups users}
-  end
+  @@idxtables = [:collections, :container_requests, :groups, :links, :repositories, :users, :virtual_machines, :workflows, :logs]
 
   def up
-    tables.each do |t|
-      remove_index t.to_sym, :created_at
-      add_index t.to_sym, [:created_at, :uuid]
+    @@idxtables.each do |table|
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at_uuid")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at_uuid")
+
+      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_created_at_uuid ON #{table.to_s} USING btree  (created_at, uuid)")
+      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_modified_at_uuid ON #{table.to_s} USING btree (modified_at desc, uuid desc)")
     end
   end
 
   def down
-    tables.each do |t|
-      remove_index t.to_sym, [:created_at, :uuid]
-      add_index t.to_sym, :created_at
+    @@idxtables.each do |table|
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_created_at_uuid")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at")
+      ActiveRecord::Base.connection.execute("DROP INDEX IF EXISTS index_#{table.to_s}_on_modified_at_uuid")
+
+      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_created_at ON #{table.to_s} USING btree  (created_at)")
+      ActiveRecord::Base.connection.execute("CREATE INDEX index_#{table.to_s}_on_modified_at_uuid ON #{table.to_s} USING btree (modified_at desc, uuid asc)")
     end
   end
 end
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index d874bce94..9c08b81e0 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -1911,6 +1911,13 @@ CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON public.authorized_keys USIN
 CREATE INDEX index_collections_on_created_at_and_uuid ON public.collections USING btree (created_at, uuid);
 
 
+--
+-- Name: index_collections_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_collections_on_created_at_uuid ON public.collections USING btree (created_at, uuid);
+
+
 --
 -- Name: index_collections_on_current_version_uuid_and_version; Type: INDEX; Schema: public; Owner: -
 --
@@ -1932,18 +1939,11 @@ CREATE INDEX index_collections_on_delete_at ON public.collections USING btree (d
 CREATE INDEX index_collections_on_is_trashed ON public.collections USING btree (is_trashed);
 
 
---
--- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE INDEX index_collections_on_modified_at ON public.collections USING btree (modified_at);
-
-
 --
 -- Name: index_collections_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_modified_at_uuid ON public.collections USING btree (modified_at DESC, uuid);
+CREATE INDEX index_collections_on_modified_at_uuid ON public.collections USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -1988,11 +1988,18 @@ CREATE UNIQUE INDEX index_collections_on_uuid ON public.collections USING btree
 CREATE INDEX index_container_requests_on_container_uuid ON public.container_requests USING btree (container_uuid);
 
 
+--
+-- Name: index_container_requests_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_container_requests_on_created_at_uuid ON public.container_requests USING btree (created_at, uuid);
+
+
 --
 -- Name: index_container_requests_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_container_requests_on_modified_at_uuid ON public.container_requests USING btree (modified_at DESC, uuid);
+CREATE INDEX index_container_requests_on_modified_at_uuid ON public.container_requests USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2100,6 +2107,13 @@ CREATE UNIQUE INDEX index_frozen_groups_on_uuid ON public.frozen_groups USING bt
 CREATE INDEX index_groups_on_created_at_and_uuid ON public.groups USING btree (created_at, uuid);
 
 
+--
+-- Name: index_groups_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_groups_on_created_at_uuid ON public.groups USING btree (created_at, uuid);
+
+
 --
 -- Name: index_groups_on_delete_at; Type: INDEX; Schema: public; Owner: -
 --
@@ -2121,18 +2135,11 @@ CREATE INDEX index_groups_on_group_class ON public.groups USING btree (group_cla
 CREATE INDEX index_groups_on_is_trashed ON public.groups USING btree (is_trashed);
 
 
---
--- Name: index_groups_on_modified_at; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE INDEX index_groups_on_modified_at ON public.groups USING btree (modified_at);
-
-
 --
 -- Name: index_groups_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_groups_on_modified_at_uuid ON public.groups USING btree (modified_at DESC, uuid);
+CREATE INDEX index_groups_on_modified_at_uuid ON public.groups USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2367,24 +2374,24 @@ CREATE INDEX index_links_on_created_at_and_uuid ON public.links USING btree (cre
 
 
 --
--- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -
+-- Name: index_links_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_head_uuid ON public.links USING btree (head_uuid);
+CREATE INDEX index_links_on_created_at_uuid ON public.links USING btree (created_at, uuid);
 
 
 --
--- Name: index_links_on_modified_at; Type: INDEX; Schema: public; Owner: -
+-- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_modified_at ON public.links USING btree (modified_at);
+CREATE INDEX index_links_on_head_uuid ON public.links USING btree (head_uuid);
 
 
 --
 -- Name: index_links_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_modified_at_uuid ON public.links USING btree (modified_at DESC, uuid);
+CREATE INDEX index_links_on_modified_at_uuid ON public.links USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2430,31 +2437,31 @@ CREATE INDEX index_logs_on_created_at_and_uuid ON public.logs USING btree (creat
 
 
 --
--- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -
+-- Name: index_logs_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_event_at ON public.logs USING btree (event_at);
+CREATE INDEX index_logs_on_created_at_uuid ON public.logs USING btree (created_at, uuid);
 
 
 --
--- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -
+-- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_event_type ON public.logs USING btree (event_type);
+CREATE INDEX index_logs_on_event_at ON public.logs USING btree (event_at);
 
 
 --
--- Name: index_logs_on_modified_at; Type: INDEX; Schema: public; Owner: -
+-- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_modified_at ON public.logs USING btree (modified_at);
+CREATE INDEX index_logs_on_event_type ON public.logs USING btree (event_type);
 
 
 --
 -- Name: index_logs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_modified_at_uuid ON public.logs USING btree (modified_at DESC, uuid);
+CREATE INDEX index_logs_on_modified_at_uuid ON public.logs USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2604,11 +2611,18 @@ CREATE INDEX index_pipeline_templates_on_owner_uuid ON public.pipeline_templates
 CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON public.pipeline_templates USING btree (uuid);
 
 
+--
+-- Name: index_repositories_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_repositories_on_created_at_uuid ON public.repositories USING btree (created_at, uuid);
+
+
 --
 -- Name: index_repositories_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_repositories_on_modified_at_uuid ON public.repositories USING btree (modified_at DESC, uuid);
+CREATE INDEX index_repositories_on_modified_at_uuid ON public.repositories USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2696,24 +2710,24 @@ CREATE INDEX index_users_on_created_at_and_uuid ON public.users USING btree (cre
 
 
 --
--- Name: index_users_on_identity_url; Type: INDEX; Schema: public; Owner: -
+-- Name: index_users_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_users_on_identity_url ON public.users USING btree (identity_url);
+CREATE INDEX index_users_on_created_at_uuid ON public.users USING btree (created_at, uuid);
 
 
 --
--- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -
+-- Name: index_users_on_identity_url; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_users_on_modified_at ON public.users USING btree (modified_at);
+CREATE UNIQUE INDEX index_users_on_identity_url ON public.users USING btree (identity_url);
 
 
 --
 -- Name: index_users_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_users_on_modified_at_uuid ON public.users USING btree (modified_at DESC, uuid);
+CREATE INDEX index_users_on_modified_at_uuid ON public.users USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2737,6 +2751,13 @@ CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (usernam
 CREATE UNIQUE INDEX index_users_on_uuid ON public.users USING btree (uuid);
 
 
+--
+-- Name: index_virtual_machines_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_virtual_machines_on_created_at_uuid ON public.virtual_machines USING btree (created_at, uuid);
+
+
 --
 -- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -
 --
@@ -2748,7 +2769,7 @@ CREATE INDEX index_virtual_machines_on_hostname ON public.virtual_machines USING
 -- Name: index_virtual_machines_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_virtual_machines_on_modified_at_uuid ON public.virtual_machines USING btree (modified_at DESC, uuid);
+CREATE INDEX index_virtual_machines_on_modified_at_uuid ON public.virtual_machines USING btree (modified_at DESC, uuid DESC);
 
 
 --
@@ -2765,11 +2786,18 @@ CREATE INDEX index_virtual_machines_on_owner_uuid ON public.virtual_machines USI
 CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON public.virtual_machines USING btree (uuid);
 
 
+--
+-- Name: index_workflows_on_created_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_workflows_on_created_at_uuid ON public.workflows USING btree (created_at, uuid);
+
+
 --
 -- Name: index_workflows_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_workflows_on_modified_at_uuid ON public.workflows USING btree (modified_at DESC, uuid);
+CREATE INDEX index_workflows_on_modified_at_uuid ON public.workflows USING btree (modified_at DESC, uuid DESC);
 
 
 --

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list