Skip to content

Commit

Permalink
[ORCA] Support cover indexes using INCLUDE columns (#15463)
Browse files Browse the repository at this point in the history
Indexes in ORCA are composed of a set of KEY columns and a separate set
of INCLUDE columns. KEY columns determine the search pattern of the
index, whereas INCLUDE columns represents the columns accessible in an
index scan. Naturally, the two sets should have some overlap.

In Postgres, cover indexes [1] were introduced in commit 8224de4.
Cover indexes store additional non-key columns in the physical index
storage to avoid incurring additional page accesses to the backend
relation files during an index-only scan.

ORCA's definition of an index's included columns predates Postgres cover
index feature. However, ORCA's current implementation of include columns
is pointless as it has always assumed that all columns in the table are
available from the index. I think that cover indexes were disabled in
ORCA [2] in Postgres 12 merge due to a conflated definition of included
columns.

In reality, Postgres's definition of included columns fits almost
seamlessly into ORCA's framework. This commit updates ORCA to adopt the
Postgres definition.

Used following sed script to remove the IncludedColumns in old MDPs:

    $ git grep -l 'IncludedColumns' -- *.xml -- *.mdp | xargs sed -ie 's/IncludedColumns="\(.*\)"/IncludedColumns=""/g'

Previously IncludedColumns represented all columns in the table. That
doesn't seem useful. Now it is being used to store cover index columns
so remove it from all pre-existing MDPs that were created before the
cover index was supported.

[1] https://www.postgresql.org/docs/12/indexes-index-only-scans.html
[2] greenplum-db/gpdb-postgres-merge-Archived@b1c1eee0a8
  • Loading branch information
dgkimura committed May 30, 2023
1 parent ead5ed6 commit b9f43b9
Show file tree
Hide file tree
Showing 255 changed files with 3,905 additions and 571 deletions.
33 changes: 33 additions & 0 deletions src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ TranslateDXLIndexTList(const IMDRelation *md_rel, const IMDIndex *md_index,

index_context->SetRelIndex(INDEX_VAR);

// Translate KEY columns
for (ULONG ul = 0; ul < md_index->Keys(); ul++)
{
ULONG key = md_index->KeyAt(ul);
Expand Down Expand Up @@ -894,6 +895,38 @@ TranslateDXLIndexTList(const IMDRelation *md_rel, const IMDIndex *md_index,
target_list = gpdb::LAppend(target_list, target_entry);
}

// Translate INCLUDED columns
for (ULONG ul = 0; ul < md_index->IncludedCols(); ul++)
{
ULONG includecol = md_index->IncludedColAt(ul);

const IMDColumn *col = md_rel->GetMdCol(includecol);

TargetEntry *target_entry = MakeNode(TargetEntry);
// KEY columns preceed INCLUDE columns
target_entry->resno = (AttrNumber) ul + 1 + md_index->Keys();

Expr *indexvar = (Expr *) gpdb::MakeVar(
new_varno, col->AttrNum(),
CMDIdGPDB::CastMdid(col->MdidType())->Oid(),
col->TypeModifier() /*vartypmod*/, 0 /*varlevelsup*/);
target_entry->expr = indexvar;

for (ULONG j = 0; j < table_descr->Arity(); j++)
{
const CDXLColDescr *dxl_col_descr =
table_descr->GetColumnDescrAt(j);
if (dxl_col_descr->AttrNum() == ((Var *) indexvar)->varattno)
{
(void) index_context->InsertMapping(dxl_col_descr->Id(),
target_entry->resno);
break;
}
}

target_list = gpdb::LAppend(target_list, target_entry);
}

return target_list;
}

Expand Down
50 changes: 13 additions & 37 deletions src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,18 +978,28 @@ CTranslatorRelcacheToDXL::RetrieveIndex(CMemoryPool *mp,

// extract the position of the key columns
index_key_cols_array = GPOS_NEW(mp) ULongPtrArray(mp);
ULongPtrArray *included_cols = GPOS_NEW(mp) ULongPtrArray(mp);

for (int i = 0; i < form_pg_index->indnatts; i++)
{
INT attno = form_pg_index->indkey.values[i];
GPOS_ASSERT(0 != attno && "Index expressions not supported");

index_key_cols_array->Append(
GPOS_NEW(mp) ULONG(GetAttributePosition(attno, attno_mapping)));
// key columns are indexed [0, indnkeyatts)
if (i < form_pg_index->indnkeyatts)
{
index_key_cols_array->Append(
GPOS_NEW(mp) ULONG(GetAttributePosition(attno, attno_mapping)));
}
// include columns are indexed [indnkeyatts, indnatts)
else
{
included_cols->Append(
GPOS_NEW(mp) ULONG(GetAttributePosition(attno, attno_mapping)));
}
}
mdid_rel->Release();

ULongPtrArray *included_cols = ComputeIncludedCols(mp, md_rel);
mdid_index->AddRef();
IMdIdArray *op_families_mdids = RetrieveIndexOpFamilies(mp, mdid_index);

Expand All @@ -1014,34 +1024,6 @@ CTranslatorRelcacheToDXL::RetrieveIndex(CMemoryPool *mp,
return index;
}

//---------------------------------------------------------------------------
// @function:
// CTranslatorRelcacheToDXL::ComputeIncludedCols
//
// @doc:
// Compute the included columns in an index
//
//---------------------------------------------------------------------------
ULongPtrArray *
CTranslatorRelcacheToDXL::ComputeIncludedCols(CMemoryPool *mp,
const IMDRelation *md_rel)
{
// TODO: 3/19/2012; currently we assume that all the columns
// in the table are available from the index.

ULongPtrArray *included_cols = GPOS_NEW(mp) ULongPtrArray(mp);
const ULONG num_included_cols = md_rel->ColumnCount();
for (ULONG ul = 0; ul < num_included_cols; ul++)
{
if (!md_rel->GetMdCol(ul)->IsDropped())
{
included_cols->Append(GPOS_NEW(mp) ULONG(ul));
}
}

return included_cols;
}


//---------------------------------------------------------------------------
// @function:
Expand Down Expand Up @@ -2661,12 +2643,6 @@ CTranslatorRelcacheToDXL::IsIndexSupported(Relation index_rel)
{
HeapTupleData *tup = index_rel->rd_indextuple;

// covering index -- it has INCLUDE (...) columns
if (index_rel->rd_index->indnatts > index_rel->rd_index->indnkeyatts)
{
return false;
}

// index expressions and index constraints not supported
return gpdb::HeapAttIsNull(tup, Anum_pg_index_indexprs) &&
gpdb::HeapAttIsNull(tup, Anum_pg_index_indpred) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ select * from x where x.i in (select last_value(y.i) over(partition by x.i order
<dxl:ResultType Mdid="0.20.1.0"/>
<dxl:IntermediateResultType Mdid="0.20.1.0"/>
</dxl:GPDBAgg>
<dxl:Index Mdid="0.17159874.1.0" Name="idx_x_j" IsClustered="false" IndexType="B-tree" KeyColumns="1" IncludedColumns="0,1,2,3,4,5,6,7,8,9">
<dxl:Index Mdid="0.17159874.1.0" Name="idx_x_j" IsClustered="false" IndexType="B-tree" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand Down Expand Up @@ -695,7 +695,7 @@ select * from x where x.i in (select last_value(y.i) over(partition by x.i order
<dxl:ResultType Mdid="0.20.1.0"/>
<dxl:IntermediateResultType Mdid="0.20.1.0"/>
</dxl:GPDBAgg>
<dxl:Index Mdid="0.17159920.1.0" Name="idx_x_i" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7,8,9">
<dxl:Index Mdid="0.17159920.1.0" Name="idx_x_i" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ select * from x where x.i in (select row_number() over(partition by x.i order by
<dxl:IntermediateResultType Mdid="0.20.1.0"/>
</dxl:GPDBAgg>
<dxl:MDScalarComparison Mdid="4.23.1.0;20.1.0;0" Name="=" ComparisonType="Eq" LeftType="0.23.1.0" RightType="0.20.1.0" OperatorMdid="0.15.1.0"/>
<dxl:Index Mdid="0.17159874.1.0" Name="idx_x_j" IsClustered="false" IndexType="B-tree" KeyColumns="1" IncludedColumns="0,1,2,3,4,5,6,7,8,9">
<dxl:Index Mdid="0.17159874.1.0" Name="idx_x_j" IsClustered="false" IndexType="B-tree" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand Down Expand Up @@ -701,7 +701,7 @@ select * from x where x.i in (select row_number() over(partition by x.i order by
<dxl:ResultType Mdid="0.20.1.0"/>
<dxl:IntermediateResultType Mdid="0.20.1.0"/>
</dxl:GPDBAgg>
<dxl:Index Mdid="0.17159920.1.0" Name="idx_x_i" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7,8,9">
<dxl:Index Mdid="0.17159920.1.0" Name="idx_x_i" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ select * from x where x.i in (select row_number() over(partition by x.i) from y)
<dxl:IntermediateResultType Mdid="0.20.1.0"/>
</dxl:GPDBAgg>
<dxl:MDScalarComparison Mdid="4.23.1.0;20.1.0;0" Name="=" ComparisonType="Eq" LeftType="0.23.1.0" RightType="0.20.1.0" OperatorMdid="0.15.1.0"/>
<dxl:Index Mdid="0.17159874.1.0" Name="idx_x_j" IsClustered="false" IndexType="B-tree" KeyColumns="1" IncludedColumns="0,1,2,3,4,5,6,7,8,9">
<dxl:Index Mdid="0.17159874.1.0" Name="idx_x_j" IsClustered="false" IndexType="B-tree" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand Down Expand Up @@ -689,7 +689,7 @@ select * from x where x.i in (select row_number() over(partition by x.i) from y)
<dxl:ResultType Mdid="0.20.1.0"/>
<dxl:IntermediateResultType Mdid="0.20.1.0"/>
</dxl:GPDBAgg>
<dxl:Index Mdid="0.17159920.1.0" Name="idx_x_i" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7,8,9">
<dxl:Index Mdid="0.17159920.1.0" Name="idx_x_i" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand Down
6 changes: 3 additions & 3 deletions src/backend/gporca/data/dxl/indexjoin/positive_04.mdp
Original file line number Diff line number Diff line change
Expand Up @@ -3541,7 +3541,7 @@
<dxl:Opfamily Mdid="0.3018.1.0"/>
</dxl:Opfamilies>
</dxl:GPDBScalarOp>
<dxl:Index Mdid="0.33052642.1.0" Name="store_sales_pkey" IsClustered="false" IndexType="B-tree" KeyColumns="2,9" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29">
<dxl:Index Mdid="0.33052642.1.0" Name="store_sales_pkey" IsClustered="false" IndexType="B-tree" KeyColumns="2,9" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
<dxl:Opfamily Mdid="0.1978.1.0"/>
Expand Down Expand Up @@ -8553,7 +8553,7 @@
</dxl:IndexInfoList>
<dxl:CheckConstraints/>
</dxl:Relation>
<dxl:Index Mdid="0.33052182.1.0" Name="store_returns_pkey" IsClustered="false" IndexType="B-tree" KeyColumns="2,9" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26">
<dxl:Index Mdid="0.33052182.1.0" Name="store_returns_pkey" IsClustered="false" IndexType="B-tree" KeyColumns="2,9" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
<dxl:Opfamily Mdid="0.1978.1.0"/>
Expand Down Expand Up @@ -13336,7 +13336,7 @@
<dxl:UpperBound Closed="true" TypeMdid="0.1043.1.0" Value="AAAABldv" LintValue="756671276"/>
</dxl:StatsBucket>
</dxl:ColumnStatistics>
<dxl:Index Mdid="0.33051952.1.0" Name="item_pkey" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28">
<dxl:Index Mdid="0.33051952.1.0" Name="item_pkey" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand Down
14 changes: 7 additions & 7 deletions src/backend/gporca/data/dxl/metadata/md.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</dxl:IndexInfoList>
<dxl:CheckConstraints/>
</dxl:Relation>
<dxl:Index Mdid="0.2345.2.1" Name="T_a" IsClustered="false" KeyColumns="1" IncludedColumns="0,1">
<dxl:Index Mdid="0.2345.2.1" Name="T_a" IsClustered="false" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1978.1.0"/>
</dxl:Opfamilies>
Expand All @@ -116,7 +116,7 @@
<dxl:Partition Mdid="6.2351.2.1"/>
</dxl:Partitions>
</dxl:Index>
<dxl:Index Mdid="0.2347.1.1" Name="T_a" IsClustered="false" KeyColumns="0" IncludedColumns="0,1">
<dxl:Index Mdid="0.2347.1.1" Name="T_a" IsClustered="false" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.434.1.0"/>
</dxl:Opfamilies>
Expand Down Expand Up @@ -1386,7 +1386,7 @@
</dxl:And>
</dxl:PartConstraint>
</dxl:Relation>
<dxl:Index Mdid="0.13144342.1.0" Name="idx_p1_j_1_prt_p11" IsClustered="false" KeyColumns="1" IncludedColumns="0,1">
<dxl:Index Mdid="0.13144342.1.0" Name="idx_p1_j_1_prt_p11" IsClustered="false" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.434.1.0"/>
</dxl:Opfamilies>
Expand All @@ -1395,7 +1395,7 @@
<dxl:Partition Mdid="6.13144344.1.0"/>
</dxl:Partitions>
</dxl:Index>
<dxl:Index Mdid="0.13144285.1.0" Name="idx_p1_i_1_prt_p11" IsClustered="false" KeyColumns="0" IncludedColumns="0,1">
<dxl:Index Mdid="0.13144285.1.0" Name="idx_p1_i_1_prt_p11" IsClustered="false" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.434.1.0"/>
</dxl:Opfamilies>
Expand Down Expand Up @@ -3099,13 +3099,13 @@
<dxl:SumAgg Mdid="0.0.0.0"/>
<dxl:CountAgg Mdid="0.2147.1.0"/>
</dxl:Type>
<dxl:Index Mdid="0.197454.1.1" Name="foo_ab" IsClustered="false" KeyColumns="0,1" IncludedColumns="0,1,2,3,4">
<dxl:Index Mdid="0.197454.1.1" Name="foo_ab" IsClustered="false" KeyColumns="0,1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.434.1.0"/>
<dxl:Opfamily Mdid="0.434.1.0"/>
</dxl:Opfamilies>
</dxl:Index>
<dxl:Index Mdid="0.197514.1.1" Name="foo_bitmap_c" IsClustered="false" KeyColumns="2" IncludedColumns="0,1,2,3,4">
<dxl:Index Mdid="0.197514.1.1" Name="foo_bitmap_c" IsClustered="false" KeyColumns="2" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.434.1.0"/>
</dxl:Opfamilies>
Expand Down Expand Up @@ -4323,7 +4323,7 @@
</dxl:And>
</dxl:PartConstraint>
</dxl:Relation>
<dxl:Index Mdid="0.27324.1.0" Name="p_ind" IsClustered="false" KeyColumns="1" IncludedColumns="0,1,2,3,4,5,6,7,8">
<dxl:Index Mdid="0.27324.1.0" Name="p_ind" IsClustered="false" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.434.1.0"/>
</dxl:Opfamilies>
Expand Down
4 changes: 2 additions & 2 deletions src/backend/gporca/data/dxl/minidump/ArrayCmpInList.mdp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
<dxl:TraceFlags Value="101013,102001,102002,102003,102074,102113,102120,102144,103001,103014,103015,103022,103027,103029,103033,104003,104004,104005,105000"/>
</dxl:OptimizerConfig>
<dxl:Metadata SystemIds="0.GPDB">
<dxl:Index Mdid="0.123270.1.0" Name="idx_b" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="1" IncludedColumns="0,1,2,3,4,5,6,7,8">
<dxl:Index Mdid="0.123270.1.0" Name="idx_b" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.3027.1.0"/>
</dxl:Opfamilies>
</dxl:Index>
<dxl:Index Mdid="0.123266.1.0" Name="idx_a" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7,8">
<dxl:Index Mdid="0.123266.1.0" Name="idx_a" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.3027.1.0"/>
</dxl:Opfamilies>
Expand Down
4 changes: 2 additions & 2 deletions src/backend/gporca/data/dxl/minidump/AssertMaxOneRow.mdp
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,13 @@ where oid= (select reltoastrelid from pg_class where relname='fsts_alter_set_sto
<dxl:Opfamily Mdid="0.3033.1.0"/>
</dxl:Opfamilies>
</dxl:GPDBScalarOp>
<dxl:Index Mdid="0.2663.1.0" Name="pg_class_relname_nsp_index" IsClustered="false" IndexType="B-tree" KeyColumns="0,1" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37">
<dxl:Index Mdid="0.2663.1.0" Name="pg_class_relname_nsp_index" IsClustered="false" IndexType="B-tree" KeyColumns="0,1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1986.1.0"/>
<dxl:Opfamily Mdid="0.1989.1.0"/>
</dxl:Opfamilies>
</dxl:Index>
<dxl:Index Mdid="0.2662.1.0" Name="pg_class_oid_index" IsClustered="false" IndexType="B-tree" KeyColumns="31" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37">
<dxl:Index Mdid="0.2662.1.0" Name="pg_class_oid_index" IsClustered="false" IndexType="B-tree" KeyColumns="31" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1989.1.0"/>
</dxl:Opfamilies>
Expand Down
2 changes: 1 addition & 1 deletion src/backend/gporca/data/dxl/minidump/BRINScan-Or.mdp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<dxl:SumAgg Mdid="0.2108.1.0"/>
<dxl:CountAgg Mdid="0.2147.1.0"/>
</dxl:Type>
<dxl:Index Mdid="0.180254.1.0" Name="foo_brin" IsClustered="false" IndexType="Brin" IndexItemType="0.2283.1.0" KeyColumns="0,1,2,3,4,5" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10,11,12">
<dxl:Index Mdid="0.180254.1.0" Name="foo_brin" IsClustered="false" IndexType="Brin" IndexItemType="0.2283.1.0" KeyColumns="0,1,2,3,4,5" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.4054.1.0"/>
<dxl:Opfamily Mdid="0.4054.1.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ SELECT * FROM test WHERE a in (1, 47);
</dxl:Relation>
<dxl:ColumnStatistics Mdid="1.41665.1.1.7" Name="gp_segment_id" Width="4.000000" NullFreq="0.000000" NdvRemain="3.000000" FreqRemain="1.000000" ColStatsMissing="false"/>
<dxl:ColumnStatistics Mdid="1.41665.1.1.6" Name="tableoid" Width="4.000000" NullFreq="0.000000" NdvRemain="1.000000" FreqRemain="1.000000" ColStatsMissing="false"/>
<dxl:Index Mdid="0.41692.1.0" Name="test_index" IsClustered="false" IndexType="B-tree" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7">
<dxl:Index Mdid="0.41692.1.0" Name="test_index" IsClustered="false" IndexType="B-tree" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1976.1.0"/>
</dxl:Opfamilies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@
<dxl:UpperBound Closed="true" TypeMdid="0.23.1.0" Value="998114"/>
</dxl:StatsBucket>
</dxl:ColumnStatistics>
<dxl:Index Mdid="0.65597.1.0" Name="test_index" IsClustered="false" IndexType="B-tree" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="0,1,2,3">
<dxl:Index Mdid="0.65597.1.0" Name="test_index" IsClustered="false" IndexType="B-tree" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1976.1.0"/>
</dxl:Opfamilies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SELECT * FROM btree_test WHERE a in (select 1);
<dxl:SumAgg Mdid="0.0.0.0"/>
<dxl:CountAgg Mdid="0.2147.1.0"/>
</dxl:Type>
<dxl:Index Mdid="0.4524693.1.0" Name="test_index" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7">
<dxl:Index Mdid="0.4524693.1.0" Name="test_index" IsClustered="false" IndexType="B-tree" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.1976.1.0"/>
</dxl:Opfamilies>
Expand Down
8 changes: 4 additions & 4 deletions src/backend/gporca/data/dxl/minidump/BitmapBoolAnd.mdp
Original file line number Diff line number Diff line change
Expand Up @@ -193,27 +193,27 @@
<dxl:SumAgg Mdid="0.0.0.0"/>
<dxl:CountAgg Mdid="0.2147.1.0"/>
</dxl:Type>
<dxl:Index Mdid="0.145185.1.0" Name="r_a" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10">
<dxl:Index Mdid="0.145185.1.0" Name="r_a" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="0" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.3027.1.0"/>
</dxl:Opfamilies>
</dxl:Index>
<dxl:Index Mdid="0.145206.1.0" Name="r_b" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="1" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10">
<dxl:Index Mdid="0.145206.1.0" Name="r_b" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="1" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.3027.1.0"/>
</dxl:Opfamilies>
</dxl:Index>
<dxl:ColumnStatistics Mdid="1.145159.1.1.10" Name="gp_segment_id" Width="4.000000" NullFreq="0.000000" NdvRemain="0.000000" FreqRemain="0.000000"/>
<dxl:ColumnStatistics Mdid="1.145159.1.1.3" Name="d" Width="8.000000" NullFreq="0.000000" NdvRemain="0.000000" FreqRemain="0.000000"/>
<dxl:ColumnStatistics Mdid="1.145159.1.1.2" Name="c" Width="8.000000" NullFreq="0.000000" NdvRemain="0.000000" FreqRemain="0.000000"/>
<dxl:Index Mdid="0.145227.1.0" Name="r_c" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="2" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10">
<dxl:Index Mdid="0.145227.1.0" Name="r_c" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="2" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.3027.1.0"/>
</dxl:Opfamilies>
</dxl:Index>
<dxl:ColumnStatistics Mdid="1.145159.1.1.5" Name="xmin" Width="4.000000" NullFreq="0.000000" NdvRemain="0.000000" FreqRemain="0.000000"/>
<dxl:ColumnStatistics Mdid="1.145159.1.1.4" Name="ctid" Width="6.000000" NullFreq="0.000000" NdvRemain="0.000000" FreqRemain="0.000000"/>
<dxl:Index Mdid="0.145248.1.0" Name="r_d" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="3" IncludedColumns="0,1,2,3,4,5,6,7,8,9,10">
<dxl:Index Mdid="0.145248.1.0" Name="r_d" IsClustered="false" IndexType="Bitmap" IndexItemType="0.2283.1.0" KeyColumns="3" IncludedColumns="">
<dxl:Opfamilies>
<dxl:Opfamily Mdid="0.3027.1.0"/>
</dxl:Opfamilies>
Expand Down
Loading

0 comments on commit b9f43b9

Please sign in to comment.