Skip to content

Stop ordering by name and pathname in steps_query window definitions#6285

Merged
zoldar merged 5 commits intomasterfrom
exploration-stop-order-by-name-pathname-in-steps-query-windows
Apr 28, 2026
Merged

Stop ordering by name and pathname in steps_query window definitions#6285
zoldar merged 5 commits intomasterfrom
exploration-stop-order-by-name-pathname-in-steps-query-windows

Conversation

@zoldar
Copy link
Copy Markdown
Contributor

@zoldar zoldar commented Apr 28, 2026

Changes

Another go at optimising performance of the suggestion query. This time we avoid ordering by name and pathname in the innermost, window queries. Stable ordering is ensured by enumerating by row_number() in the inner window and using it for sortin in the outer window, in addition to the timestamp. Very rarely, there's an artifact of a suggestion identical to the previous step appearing but it has 0 visitors - it's most likely due to union -> "smart join" optimisation done earlier.

@zoldar zoldar added the preview label Apr 28, 2026
@github-actions
Copy link
Copy Markdown

Preview environment👷🏼‍♀️🏗️
PR-6285

@zoldar zoldar marked this pull request as ready for review April 28, 2026 14:16
@zoldar zoldar added this pull request to the merge queue Apr 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@zoldar zoldar added this pull request to the merge queue Apr 28, 2026
Merged via the queue into master with commit 6be0b06 Apr 28, 2026
22 checks passed
@zoldar zoldar deleted the exploration-stop-order-by-name-pathname-in-steps-query-windows branch April 28, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants