[
https://issues.apache.org/jira/browse/ASTERIXDB-3543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923956#comment-17923956
]
Wail Y. Alkowaileet commented on ASTERIXDB-3543:
------------------------------------------------
Inlining single reference expressions is important (IMHO) when you have large
expressions of variables that are referenced once. Imagine a mathematical
expression like the following
{code:java}
($$x + $$y)/($$j * 51 * $$t)
{code}
Replacing those variables with expressions (i.e., inlining) could mean removing
one or more assigns. Additionally, imagine both $$t and $$j are constants. That
means we can constant-fold the division denominator if both ($$t and $$j)
inlined as constants.
I remember one of weak points we observed when we benchmarked
[Iris-hep|https://github.com/RumbleDB/iris-hep-benchmark-sqlpp/tree/716730277fe6eadd0ba0da4847fb150475c81508]
SQL++ queries is that we're missing so many of these optimizations. Here's a
quote of what I wrote in my thesis back then: " In multiple cases, AsterixDB’s
compiler failed to fold constant values or to eliminate common expressions –
thus increasing the number of function calls that evaluate those expressions
and consequently hindering query performance."
> Investigate single reference inlining rule
> ------------------------------------------
>
> Key: ASTERIXDB-3543
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3543
> Project: Apache AsterixDB
> Issue Type: Task
> Components: COMP - Compiler
> Reporter: Vijay Sarathy
> Assignee: Vijay Sarathy
> Priority: Major
> Labels: triaged
>
> Query takes too long when field accesses get inlined, resulting in the
> document not being projected early at the beginning of the plan. Investigate
> this issue and suggest improvements as part of this task.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)