[
https://issues.apache.org/jira/browse/TRAFODION-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15008987#comment-15008987
]
ASF GitHub Bot commented on TRAFODION-1423:
-------------------------------------------
Github user sureshsubbiah commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/178#discussion_r45084467
--- Diff: core/sql/generator/GenExpGenerator.cpp ---
@@ -2892,7 +2892,8 @@ short ExpGenerator::generateKeyEncodeExpr(const
IndexDesc * indexDesc,
if (handleSerialization)
{
NAColumn * nac = indexDesc->getNAFileSet()->getIndexKeyColumns()[i];
- if (CmpSeabaseDDL::isEncodingNeededForSerialization(nac))
+ NABoolean isAlignedRowFormat =
indexDesc->getNAFileSet()->isSqlmxAlignedRowFormat();
+ if ((!isAlignedRowFormat) &&
CmpSeabaseDDL::isEncodingNeededForSerialization(nac))
--- End diff --
Since the NAColumn object has a data member describing its serialization
state, why do we ned the additional check of !isAlignedFormat here?
For example t1.b is serialized bit the correspond column in the index
t1_ix1.b is part of an aligned row and therefor not serailized. I would have
expected CmpSeabaseDDL::isEncodingNeededForSerialization(nac) to return FALSE
for t1_ix1.b since you havetaken care to set up two different NAColumn objects
for the table and index.
> Indexes on trafodion should be created in aligned row format by default
> -----------------------------------------------------------------------
>
> Key: TRAFODION-1423
> URL: https://issues.apache.org/jira/browse/TRAFODION-1423
> Project: Apache Trafodion
> Issue Type: Improvement
> Components: sql-cmp, sql-cmu
> Affects Versions: 2.0-incubating
> Reporter: Selvaganesan Govindarajan
> Assignee: Selvaganesan Govindarajan
>
> Currently indexes are created with the same row format as the table. However,
> indexes can be created in aligned row format independent of the table because
> the columns in the index table doesn't have any other column other than salt,
> index columns, and primary key of the table. These column values constitute
> the rowid. Index rows are always deleted and inserted and are never updated.
> Hence, it goes well to create index in aligned row format. In addition, index
> in aligned row format has the following advantages:
> - Reduced storage space for the index
> - Reduced block cache and memstore space at runtime
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)