You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-507 Further ExeMgr performance improvements
This does the following: * Switch resource manager to a singleton which reduces the amount of times the XML data is scanned and objects allocated. * Make the I_S tables use the FE implementation of the system catalog * Make the I_S.columnstore_columns table use the RID list cache * Make the extentmap pre-allocate a vector instead of many small allocs
This commit is contained in:
@ -96,8 +96,8 @@ namespace
|
||||
{
|
||||
|
||||
typedef CalpontSelectExecutionPlan::ColumnMap::value_type CMVT_;
|
||||
ResourceManager rm;
|
||||
bool useHdfs = rm.useHdfs();
|
||||
ResourceManager *rm = ResourceManager::instance();
|
||||
bool useHdfs = rm->useHdfs();
|
||||
|
||||
#include "ha_autoi.cpp"
|
||||
|
||||
|
@ -77,9 +77,9 @@ using namespace joblist;
|
||||
|
||||
namespace
|
||||
{
|
||||
ResourceManager rm;
|
||||
uint64_t fBatchInsertGroupRows = rm.getRowsPerBatch();
|
||||
bool useHdfs = rm.useHdfs();
|
||||
ResourceManager *rm = ResourceManager::instance();
|
||||
uint64_t fBatchInsertGroupRows = rm->getRowsPerBatch();
|
||||
bool useHdfs = rm->useHdfs();
|
||||
|
||||
//convenience fcn
|
||||
inline uint32_t tid2sid(const uint32_t tid)
|
||||
|
@ -169,8 +169,8 @@ const unsigned NONSUPPORTED_ERR_THRESH = 2000;
|
||||
|
||||
//TODO: make this session-safe (put in connMap?)
|
||||
vector<RMParam> rmParms;
|
||||
ResourceManager rm;
|
||||
bool useHdfs = rm.useHdfs();
|
||||
ResourceManager *rm = ResourceManager::instance();
|
||||
bool useHdfs = rm->useHdfs();
|
||||
//convenience fcn
|
||||
inline uint32_t tid2sid(const uint32_t tid)
|
||||
{
|
||||
@ -1859,8 +1859,8 @@ const char* calsetparms(UDF_INIT* initid, UDF_ARGS* args,
|
||||
algorithm::to_lower(pstr);
|
||||
if (pstr == PmSmallSideMaxMemory)
|
||||
{
|
||||
joblist::ResourceManager rm;
|
||||
if (rm.getHjTotalUmMaxMemorySmallSide() >= value)
|
||||
joblist::ResourceManager *rm = joblist::ResourceManager::instance();
|
||||
if (rm->getHjTotalUmMaxMemorySmallSide() >= value)
|
||||
{
|
||||
rmParms.push_back(RMParam(sessionID, execplan::PMSMALLSIDEMEMORY, value));
|
||||
|
||||
@ -1869,7 +1869,7 @@ const char* calsetparms(UDF_INIT* initid, UDF_ARGS* args,
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = invalidParmSizeMessage(rm.getHjTotalUmMaxMemorySmallSide(), mlen);
|
||||
msg = invalidParmSizeMessage(rm->getHjTotalUmMaxMemorySmallSide(), mlen);
|
||||
includeInput = false;
|
||||
}
|
||||
}
|
||||
|
@ -65,10 +65,12 @@ static int is_columnstore_columns_fill(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
const std::vector< std::pair<execplan::CalpontSystemCatalog::OID, execplan::CalpontSystemCatalog::TableName> > catalog_tables
|
||||
= systemCatalogPtr->getTables();
|
||||
|
||||
systemCatalogPtr->identity(execplan::CalpontSystemCatalog::FE);
|
||||
|
||||
for (std::vector<std::pair<execplan::CalpontSystemCatalog::OID, execplan::CalpontSystemCatalog::TableName> >::const_iterator it = catalog_tables.begin();
|
||||
it != catalog_tables.end(); ++it)
|
||||
{
|
||||
execplan::CalpontSystemCatalog::RIDList column_rid_list = systemCatalogPtr->columnRIDs((*it).second);
|
||||
execplan::CalpontSystemCatalog::RIDList column_rid_list = systemCatalogPtr->columnRIDs((*it).second, true);
|
||||
for (size_t col_num = 0; col_num < column_rid_list.size(); col_num++)
|
||||
{
|
||||
execplan::CalpontSystemCatalog::TableColName tcn = systemCatalogPtr->colName(column_rid_list[col_num].objnum);
|
||||
|
@ -50,6 +50,8 @@ static int is_columnstore_tables_fill(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
boost::shared_ptr<execplan::CalpontSystemCatalog> systemCatalogPtr =
|
||||
execplan::CalpontSystemCatalog::makeCalpontSystemCatalog(execplan::CalpontSystemCatalog::idb_tid2sid(thd->thread_id));
|
||||
|
||||
systemCatalogPtr->identity(execplan::CalpontSystemCatalog::FE);
|
||||
|
||||
const std::vector< std::pair<execplan::CalpontSystemCatalog::OID, execplan::CalpontSystemCatalog::TableName> > catalog_tables
|
||||
= systemCatalogPtr->getTables();
|
||||
|
||||
|
Reference in New Issue
Block a user