You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2018/04/30 18:48:00 UTC

[jira] [Created] (TRAFODION-3050) Inefficient plan when joining on VARCHAR columns

David Wayne Birdsall created TRAFODION-3050:
-----------------------------------------------

             Summary: Inefficient plan when joining on VARCHAR columns
                 Key: TRAFODION-3050
                 URL: https://issues.apache.org/jira/browse/TRAFODION-3050
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
    Affects Versions: 2.3
            Reporter: David Wayne Birdsall
            Assignee: David Wayne Birdsall
         Attachments: JiraVarchar.log, JiraVarchar.sql

This is follow-on work to Jira TRAFODION-3031. That Jira fixed some issues with plan choice when joining on integer columns.

In this particular example, the join is on VARCHAR columns. With the fix from Jira TRAFODION-3031, we get a nice nested join plan for the subqueries, but still get a hash join at the top, which is inefficient in this example.

The attached script reproduces the problem and demonstrates a work-around. When CQD COMP_BOOL_158 is set to 'ON', we get a good plan. The attached log shows the script results.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)