You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-06-13 16:01:32 +03:00
MCOL-5021 Add an option in Columnstore.xml, fastdelete (disabled
by default), which when enabled, indiscriminately invalidates all column extents and performs the actual DELETE only on the AUX column. The trade-off with this approach would now be that the first SELECT for certain query patterns (those containing a WHERE predicate) after the DELETE operation will slow down as the invalidated column extent would need to be scanned again to set the min/max values.
This commit is contained in:
@ -4601,9 +4601,38 @@ int WriteEngineWrapper::updateColumnRec(const TxnID& txnid, const vector<CSCType
|
||||
// timer.start("markExtentsInvalid");
|
||||
//#endif
|
||||
|
||||
rc = writeColumnRecUpdate(txnid, cscColTypeList, colStructList, colValueList, colOldValueList,
|
||||
ridLists[extent], tableOid, true, ridLists[extent].size(),
|
||||
¤tExtentRangesPtrs, hasAUXCol);
|
||||
bool hasFastDelete = false;
|
||||
|
||||
if (m_opType == DELETE && hasAUXCol)
|
||||
{
|
||||
hasFastDelete = Config::getFastDelete();
|
||||
}
|
||||
|
||||
if (hasFastDelete)
|
||||
{
|
||||
ColStructList colStructListAUX(1, colStructList.back());
|
||||
WriteEngine::CSCTypesList cscColTypeListAUX(1, cscColTypeList.back());
|
||||
ColValueList colValueListAUX(1, colValueList.back());
|
||||
std::vector<ExtCPInfo*> currentExtentRangesPtrsAUX(1, currentExtentRangesPtrs.back());
|
||||
|
||||
rc = writeColumnRecUpdate(txnid, cscColTypeListAUX, colStructListAUX, colValueListAUX, colOldValueList,
|
||||
ridLists[extent], tableOid, true, ridLists[extent].size(),
|
||||
¤tExtentRangesPtrsAUX, hasAUXCol);
|
||||
|
||||
for (auto& cpInfoPtr : currentExtentRangesPtrs)
|
||||
{
|
||||
if (cpInfoPtr)
|
||||
{
|
||||
cpInfoPtr->toInvalid();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = writeColumnRecUpdate(txnid, cscColTypeList, colStructList, colValueList, colOldValueList,
|
||||
ridLists[extent], tableOid, true, ridLists[extent].size(),
|
||||
¤tExtentRangesPtrs, hasAUXCol);
|
||||
}
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user