mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FIX: more performance improvement for PostAlert job (#22487)
Simplified query based on SiteSettings to join only relevant user_options rows. In addition, index was added to 'watched_precedence_over_muted` column in `user_options` table to speed up query
This commit is contained in:

committed by
GitHub

parent
4d5f9b8a21
commit
bdecd697b9
@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddWatchedPrecedenceOverMutedIndexToUserOptions < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_index :user_options, :watched_precedence_over_muted
|
||||
end
|
||||
end
|
@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
#
|
||||
class AddTopicIdNotificationLevelIndexToTopicUsers < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_index :topic_users, %i[topic_id notification_level]
|
||||
end
|
||||
end
|
@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddCategoryIdNotificationLevelIndexToCategoryUsers < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_index :category_users, %i[category_id notification_level]
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user