mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #20459] [MERGED] fix(channels): eliminate N+1 query in get_pinned_messages endpoint #80505
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20459
Author: @Classic298
Created: 1/7/2026
Status: ✅ Merged
Merged: 1/7/2026
Merged by: @tjbck
Base:
dev← Head:channel-perf-2📝 Commits (1)
85afef5fix(channels): eliminate N+1 query in get_pinned_messages endpoint📊 Changes
1 file changed (+7 additions, -5 deletions)
View changed files
📝
backend/open_webui/routers/channels.py(+7 -5)📄 Description
Replaced per-message user lookup with batch fetch using SQL IN clause.
Changes:
Performance: Reduces N+1 queries to 2 queries (messages + users)
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.