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:
Sam
2023-03-28 15:13:44 +11:00
committed by GitHub
parent c912c58d6c
commit 7038540af6
2 changed files with 32 additions and 1 deletions

View File

@@ -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
#