data: optimize memory of sqlite database
* use sqlite "VACUUM" after analysis to reduce memory size * only add filename to name of local symbol
This commit is contained in:
@@ -361,6 +361,18 @@ std::vector<StorageEdge> SqliteStorage::getEdgesByTargetType(Id targetId, int ty
|
||||
return getAll<StorageEdge>("WHERE target_node_id == " + std::to_string(targetId) + " AND type == " + std::to_string(type));
|
||||
}
|
||||
|
||||
void SqliteStorage::optimizeMemory() const
|
||||
{
|
||||
try
|
||||
{
|
||||
m_database.execDML("VACUUM;");
|
||||
}
|
||||
catch(CppSQLite3Exception e)
|
||||
{
|
||||
LOG_ERROR(e.errorMessage());
|
||||
}
|
||||
}
|
||||
|
||||
void SqliteStorage::optimizeFTSTable() const
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user