0
0
Fork 0

Change follow recommendation materialized view to be faster in most cases (#26545)

Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
Claire 2023-08-18 18:20:55 +02:00 committed by GitHub
parent e7bea8f004
commit ee702e36e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 10 deletions

View file

@ -0,0 +1,8 @@
# frozen_string_literal: true
class CreateGlobalFollowRecommendations < ActiveRecord::Migration[7.0]
def change
create_view :global_follow_recommendations, materialized: { no_data: true }
safety_assured { add_index :global_follow_recommendations, :account_id, unique: true }
end
end