diff --git a/db/migrate/20220403220558_add_url_index_on_artist_urls.rb b/db/migrate/20220403220558_add_url_index_on_artist_urls.rb new file mode 100644 index 000000000..144e84674 --- /dev/null +++ b/db/migrate/20220403220558_add_url_index_on_artist_urls.rb @@ -0,0 +1,5 @@ +class AddURLIndexOnArtistURLs < ActiveRecord::Migration[7.0] + def change + add_index :artist_urls, :url, opclass: :text_pattern_ops + end +end diff --git a/db/structure.sql b/db/structure.sql index 27405af0b..109fa33b5 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -3146,6 +3146,13 @@ CREATE INDEX index_artist_urls_on_normalized_url_trgm ON public.artist_urls USIN CREATE INDEX index_artist_urls_on_regexp_replace_lower_url ON public.artist_urls USING btree (((regexp_replace(lower(url), '^https?://|/$'::text, ''::text, 'g'::text) || '/'::text)) text_pattern_ops); +-- +-- Name: index_artist_urls_on_url; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_artist_urls_on_url ON public.artist_urls USING btree (url text_pattern_ops); + + -- -- Name: index_artist_urls_on_url_trgm; Type: INDEX; Schema: public; Owner: - -- @@ -5788,6 +5795,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20220210200157'), ('20220211075129'), ('20220318082614'), -('20220403042706'); +('20220403042706'), +('20220403220558');