mirror of https://gitee.com/bigwinds/arangodb
Index can now be used for sorting if only parts of the attributes are covered. The more attribitues are covered the more likely this index will be used
This commit is contained in:
parent
eecb6a9949
commit
4ceb10dc19
|
@ -1239,6 +1239,10 @@ bool SkiplistIndex::supportsSortCondition (triagens::aql::SortCondition const* s
|
|||
estimatedCost = 0.0;
|
||||
return true;
|
||||
}
|
||||
else if (coveredAttributes > 0) {
|
||||
estimatedCost = (itemsInIndex / (coveredAttributes + 1)) * std::log2(static_cast<double>(itemsInIndex));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue