1
0
Fork 0

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:
Michael Hackstein 2015-10-19 16:59:13 +02:00
parent eecb6a9949
commit 4ceb10dc19
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}
}
}