Skip to content

Conversation

pavgust
Copy link
Contributor

@pavgust pavgust commented Sep 18, 2019

Empirically, computing hashcons values for certain snapshots (especially where many array aggregate literals were used) was very slow. This PR proposes a bunch of changes (intended to be behaviour-preserving) which allow the optimiser to do a better job.

As the linearity of the disjuncts is different, this enables us to
pick better join orders for each disjunct separately.
The user knows that an expression functionally determines its
hashCons value, and that an expression functionally determines
its number of children, but this is not provable from the
definitions, and so not usable by the optimiser. By storing
the result of those known-functional calls in a variable,
rather than repeating the call, we enable better join orders.
@pavgust pavgust requested a review from a team as a code owner September 18, 2019 11:57
@pavgust pavgust added the C++ label Sep 18, 2019
@pavgust pavgust changed the title Fix HashCons library performance C++: Fix HashCons library performance Sep 18, 2019
Copy link
Contributor

@jbj jbj left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

@jbj jbj merged commit 9b805c0 into github:master Sep 19, 2019
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