You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-06 08:40:57 +03:00
Improve batch inserts.
1) Instead of making dbrm calls to writeVBEntry() per block,
we make these calls per batch. This can have non-trivial
reductions in the overhead of these calls if the batch size
is large.
2) In dmlproc, do not deserialize the whole insertpackage, which
consists of the complete record set per column, which would be
wasteful as we only need some metadata fields from insertpackage
here. This is only done for batch inserts at the moment, this
should also be applied to single inserts.
This commit is contained in:
@@ -548,7 +548,7 @@ void PackageHandler::run()
|
||||
dmlpackage::InsertDMLPackage insertPkg;
|
||||
//boost::shared_ptr<messageqcpp::ByteStream> insertBs (new messageqcpp::ByteStream);
|
||||
messageqcpp::ByteStream bsSave = *(fByteStream.get());
|
||||
insertPkg.read(*(fByteStream.get()));
|
||||
insertPkg.readMetaData(*(fByteStream.get()));
|
||||
#ifdef MCOL_140
|
||||
|
||||
if (fConcurrentSupport)
|
||||
@@ -584,8 +584,8 @@ void PackageHandler::run()
|
||||
//cout << "This is batch insert " << insertPkg->get_isBatchInsert() << endl;
|
||||
if (insertPkg.get_isBatchInsert())
|
||||
{
|
||||
fByteStream->reset();
|
||||
//cout << "This is batch insert " << endl;
|
||||
//boost::shared_ptr<messageqcpp::ByteStream> insertBs (new messageqcpp::ByteStream(fByteStream));
|
||||
BatchInsertProc* batchProcessor = NULL;
|
||||
{
|
||||
boost::mutex::scoped_lock lk(DMLProcessor::batchinsertProcessorMapLock);
|
||||
@@ -900,7 +900,11 @@ void PackageHandler::run()
|
||||
}
|
||||
else // Single Insert
|
||||
{
|
||||
//insertPkg.readTable(*(fByteStream.get()));
|
||||
// make sure insertPkg.readMetaData() is called before
|
||||
// this on fByteStream!
|
||||
// TODO: Similar to batch inserts, don't
|
||||
// deserialize the row data here for single inserts.
|
||||
insertPkg.readRowData(*(fByteStream.get()));
|
||||
insertPkg.set_TxnID(fTxnid);
|
||||
fProcessor.reset(new dmlpackageprocessor::InsertPackageProcessor(fDbrm, insertPkg.get_SessionID()));
|
||||
result = fProcessor->processPackage(insertPkg);
|
||||
|
||||
Reference in New Issue
Block a user