mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: ensure sidebar section link index is correctly ordered (#20854)
We perform lookups on sidebar section links based on sidebar_section_id totally ignoring user. This ensures we have an index to work with. This removes the previous index `links_user_id_section_id_position` which partially doubled up `idx_unique_sidebar_section_links`
This commit is contained in:
@@ -47,7 +47,7 @@ end
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# idx_sidebar_section_links_on_sidebar_section_id (sidebar_section_id,user_id,position) UNIQUE
|
||||
# idx_unique_sidebar_section_links (user_id,linkable_type,linkable_id) UNIQUE
|
||||
# index_sidebar_section_links_on_linkable_type_and_linkable_id (linkable_type,linkable_id)
|
||||
# links_user_id_section_id_position (user_id,sidebar_section_id,position) UNIQUE
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user