Skip to content

Speed up column permissions query.#94

Merged
tuhaihe merged 1 commit into
apache:mainfrom
woblerr:improve_metadata_backup_speed
Apr 28, 2026
Merged

Speed up column permissions query.#94
tuhaihe merged 1 commit into
apache:mainfrom
woblerr:improve_metadata_backup_speed

Conversation

@woblerr
Copy link
Copy Markdown
Collaborator

@woblerr woblerr commented Apr 27, 2026

Use a top-level unnest(CASE ...) AS privileges instead of LEFT JOIN LATERAL. This removes an extra join and per-array expansion, reducing planner/executor work when scanning large catalogs.

Related to #88

@woblerr woblerr mentioned this pull request Apr 27, 2026
@tuhaihe tuhaihe requested a review from MisterRaindrop April 28, 2026 06:06
Copy link
Copy Markdown

@MisterRaindrop MisterRaindrop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Use a top-level `unnest(CASE ...) AS privileges` instead of `LEFT JOIN LATERAL`.
This removes an extra join and per-array expansion, reducing planner/executor work when scanning large catalogs.

Related to apache#88
@tuhaihe tuhaihe force-pushed the improve_metadata_backup_speed branch from 1e547d0 to fec2b8a Compare April 28, 2026 06:17
@tuhaihe tuhaihe merged commit c58b07c into apache:main Apr 28, 2026
10 checks passed
@woblerr woblerr deleted the improve_metadata_backup_speed branch April 28, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants