Skip to content

feat: use Distinct instead of Project for profile metadata queries#5959

Merged
brancz merged 1 commit into
parca-dev:mainfrom
secfree:250917-distinct-profile-meta
Sep 17, 2025
Merged

feat: use Distinct instead of Project for profile metadata queries#5959
brancz merged 1 commit into
parca-dev:mainfrom
secfree:250917-distinct-profile-meta

Conversation

@secfree
Copy link
Copy Markdown
Contributor

@secfree secfree commented Sep 17, 2025

Replace Project() with Distinct() in GetProfileMetadataMappings and
GetProfileMetadataLabels methods to ensure unique results and improve
query performance by eliminating duplicate stacktrace and label entries.

This change will not affect correctness as GetProfileMetadataMappings
and GetProfileMetadataLabels also have deduplicate logic.

This change helps reduce 100+ million rows from the underlying database, just like #5921

@secfree secfree requested a review from a team as a code owner September 17, 2025 03:56
@secfree
Copy link
Copy Markdown
Contributor Author

secfree commented Sep 17, 2025

"make go/lint" failed with "arrow.Record is deprecated" is not related to this change,
as the "main" branch also has the same issue.

@brancz brancz merged commit 6b6bcab into parca-dev:main Sep 17, 2025
31 of 34 checks passed
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.

2 participants