[ARVADOS] created: 5d5954f0b221806198130a0b877d3f377c944a26
Git user
git at public.curoverse.com
Mon Oct 24 20:22:17 EDT 2016
at 5d5954f0b221806198130a0b877d3f377c944a26 (commit)
commit 5d5954f0b221806198130a0b877d3f377c944a26
Author: radhika <radhika at curoverse.com>
Date: Mon Oct 24 20:21:16 2016 -0400
10028: add varchar pattern indices on links on head_uuid, tail_uuid and owner_uuid.
diff --git a/services/api/db/migrate/20161024233727_add_varchar_pattern_indices_on_links.rb b/services/api/db/migrate/20161024233727_add_varchar_pattern_indices_on_links.rb
new file mode 100644
index 0000000..068f94a
--- /dev/null
+++ b/services/api/db/migrate/20161024233727_add_varchar_pattern_indices_on_links.rb
@@ -0,0 +1,13 @@
+class AddVarcharPatternIndicesOnLinks < ActiveRecord::Migration
+ def up
+ execute "CREATE INDEX links_varchar_index_on_head_uuid ON links (head_uuid varchar_pattern_ops);"
+ execute "CREATE INDEX links_varchar_index_on_tail_uuid ON links (tail_uuid varchar_pattern_ops);"
+ execute "CREATE INDEX links_varchar_index_on_owner_uuid ON links (owner_uuid varchar_pattern_ops);"
+ end
+
+ def down
+ execute "DROP INDEX links_varchar_index_on_owner_uuid;"
+ execute "DROP INDEX links_varchar_index_on_tail_uuid;"
+ execute "DROP INDEX links_varchar_index_on_head_uuid;"
+ end
+end
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 0db782a..0924fc0 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -2318,6 +2318,27 @@ CREATE UNIQUE INDEX links_tail_name_unique_if_link_class_name ON links USING btr
--
+-- Name: links_varchar_index_on_head_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE INDEX links_varchar_index_on_head_uuid ON links USING btree (head_uuid varchar_pattern_ops);
+
+
+--
+-- Name: links_varchar_index_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE INDEX links_varchar_index_on_owner_uuid ON links USING btree (owner_uuid varchar_pattern_ops);
+
+
+--
+-- Name: links_varchar_index_on_tail_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE INDEX links_varchar_index_on_tail_uuid ON links USING btree (tail_uuid varchar_pattern_ops);
+
+
+--
-- Name: logs_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2395,6 +2416,13 @@ CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (v
--
+-- Name: user_uuid_pattern; Type: INDEX; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE INDEX user_uuid_pattern ON users USING btree (uuid varchar_pattern_ops);
+
+
+--
-- Name: users_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2694,4 +2722,6 @@ INSERT INTO schema_migrations (version) VALUES ('20160909181442');
INSERT INTO schema_migrations (version) VALUES ('20160926194129');
-INSERT INTO schema_migrations (version) VALUES ('20161019171346');
\ No newline at end of file
+INSERT INTO schema_migrations (version) VALUES ('20161019171346');
+
+INSERT INTO schema_migrations (version) VALUES ('20161024233727');
\ No newline at end of file
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list