[JBoss JIRA] (TEIID-5532) Common table projection minimization does not account for usage in a subquery nested in an aggregate or in some view scenarios
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5532?page=com.atlassian.jira.plugin... ]
Steven Hawkins reopened TEIID-5532:
-----------------------------------
Reopening to address the performance issue. I'll probably just restrict the minimization to run for only user queries.
> Common table projection minimization does not account for usage in a subquery nested in an aggregate or in some view scenarios
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5532
> URL: https://issues.jboss.org/browse/TEIID-5532
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 11.0.3, 11.1.2, 12.0, 11.2.1
>
>
> Nesting the usage of a common table in an aggregate means that the columns can be removed inappropriately by projection minimization. A query such as:
> with CTE1 as /*+ no_inline */ (SELECT e1, e2, e3 from pm1.g1)
> select array_agg((select e3 from cte1 where e1=pm1.g2.e1 and e2=pm1.g2.e2)) from pm1.g2
> will return null values for all e3 as projection minimization of CTE1 will replace the column with a null value.
> A similar situation occurs when the query above is defined instead in a view. A similar issue was captured on TEIID-5535
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (TEIID-5532) Common table projection minimization does not account for usage in a subquery nested in an aggregate or in some view scenarios
by dalex dalex (Jira)
[ https://issues.jboss.org/browse/TEIID-5532?page=com.atlassian.jira.plugin... ]
dalex dalex commented on TEIID-5532:
------------------------------------
Hi [~shawkins], I noticed some performance degradation because of changes in scope of the issue, I mean changes related to new algorithm for gathering commands (after "common tables from the user command, and everything else from the plan" comment in RelationalPlanner.planWith method). I noticed that now the collection is getting more commands than before and as a result all these command go to planner.generatePlan method which can consume very much time. I have a very big structure with many virtual views which use CTEs and some queries started to work slower than before. If you need the structure to confirm the bad performance I'll try to prepare it.
> Common table projection minimization does not account for usage in a subquery nested in an aggregate or in some view scenarios
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5532
> URL: https://issues.jboss.org/browse/TEIID-5532
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 11.0.3, 11.1.2, 12.0, 11.2.1
>
>
> Nesting the usage of a common table in an aggregate means that the columns can be removed inappropriately by projection minimization. A query such as:
> with CTE1 as /*+ no_inline */ (SELECT e1, e2, e3 from pm1.g1)
> select array_agg((select e3 from cte1 where e1=pm1.g2.e1 and e2=pm1.g2.e2)) from pm1.g2
> will return null values for all e3 as projection minimization of CTE1 will replace the column with a null value.
> A similar situation occurs when the query above is defined instead in a view. A similar issue was captured on TEIID-5535
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (TEIID-5540) Better exception message with invalid local url
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5540:
-------------------------------------
Summary: Better exception message with invalid local url
Key: TEIID-5540
URL: https://issues.jboss.org/browse/TEIID-5540
Project: Teiid
Issue Type: Quality Risk
Components: JDBC Driver
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 12.0
When connecting via jdbc with a local url but not in a running server a class loading exception occurs, which does not indicate what the actual issue is.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (TEIID-5539) HierarchyVisitor does not visit array expressions
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5539?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5539.
-----------------------------------
Resolution: Done
Resolved separate from TEIID-5528 in case a more selective backport is needed, but I don't see any built-in case that would need this just yet.
> HierarchyVisitor does not visit array expressions
> -------------------------------------------------
>
> Key: TEIID-5539
> URL: https://issues.jboss.org/browse/TEIID-5539
> Project: Teiid
> Issue Type: Bug
> Components: Connector API
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.0
>
>
> The Array class is used to represent both Array expressions and Array literals (which will just have all Literal values). However it was never updated to the hierarchy visitor to visit the child expressions.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (TEIID-5528) Implement insert handling of arrays in PostgreSQL
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5528?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5528.
-----------------------------------
Fix Version/s: 12.0
Resolution: Done
Updated the pg logic to check for array literals and use a prepared statement binding for them instead. This will work for simple arrays with known type handling.
In some corner cases where the array values where not already marked as bindable we may need to reinstate the row value version of the logic for use in comparisons as directly having the literal values would be better for optimization.
> Implement insert handling of arrays in PostgreSQL
> -------------------------------------------------
>
> Key: TEIID-5528
> URL: https://issues.jboss.org/browse/TEIID-5528
> Project: Teiid
> Issue Type: Feature Request
> Affects Versions: 11.2
> Reporter: Vojtech Kolacek
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.0
>
>
> Insert handling of arrays is missing for PostgreSQL, e.g.
> INSERT INTO "public"."form_formname" ("booltest") VALUES ((true, false, true, false))
> is not being translated to
> INSERT INTO "public"."form_formname" ("booltest") VALUES ('{true, false, true, false}')
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (TEIID-5539) HierarchyVisitor does not visit array expressions
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5539:
-------------------------------------
Summary: HierarchyVisitor does not visit array expressions
Key: TEIID-5539
URL: https://issues.jboss.org/browse/TEIID-5539
Project: Teiid
Issue Type: Bug
Components: Connector API
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 12.0
The Array class is used to represent both Array expressions and Array literals (which will just have all Literal values). However it was never updated to the hierarchy visitor to visit the child expressions.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month