artist urls: add index on url column.

This commit is contained in:
evazion
2022-04-03 17:08:36 -05:00
parent 83f5124a5e
commit 70c5332be8
2 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
class AddURLIndexOnArtistURLs < ActiveRecord::Migration[7.0]
def change
add_index :artist_urls, :url, opclass: :text_pattern_ops
end
end

View File

@@ -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');