You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kwannoel
changed the title
Use functional dependencies to optimize unnecessary order key
Use functional dependencies to optimize unnecessary order key column
Apr 4, 2024
The query:
Has the plan:
But there's a functional dependency because
id
is the stream key:So this means we won't have such cases:
This means in the sql above, we actually just need to have
id
as the pk columns, sincei
won't affect the sorting:Specifically, in cases where there is a functional dependency between the prefix and the next column, we can prune the next column.
The text was updated successfully, but these errors were encountered: