Open
Description
This SQL is slow because pin_order
is not an index column. After reviewing #24406 again, I prefer to create a new table to store pin order like #24406 (comment) described by @delvh
SELECT `id`, `repo_id`, `index`, `poster_id`, `original_author`, `original_author_id`, `name`, `content`, `content_version`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `pin_order`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked`, `time_estimate` FROM `issue` WHERE (repo_id = xxx) AND (is_pull = 0) AND (pin_order > 0) ORDER BY pin_order
Another idea is to add an index for column pin_order
but we will have more and more index columns which is still a problem.