Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance problem about pin issue #33213

Open
lunny opened this issue Jan 11, 2025 · 0 comments
Open

Performance problem about pin issue #33213

lunny opened this issue Jan 11, 2025 · 0 comments
Labels
performance/bigrepo Performance Issues affecting Big Repositories

Comments

@lunny
Copy link
Member

lunny commented Jan 11, 2025

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.

@lunny lunny added the performance/bigrepo Performance Issues affecting Big Repositories label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance/bigrepo Performance Issues affecting Big Repositories
Projects
None yet
Development

No branches or pull requests

1 participant