MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / appendIndexStats

Function appendIndexStats

src/storage/stats/planner_stats.cpp:62–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62static void appendIndexStats(PlannerTableStats& plannerStats, const Catalog& catalog,
63 const Transaction* transaction, const TableCatalogEntry& tableEntry, table_id_t tableID) {
64 for (const auto indexEntry : catalog.getIndexEntries(transaction, tableID)) {
65 auto indexStats = PlannerIndexStats{};
66 indexStats.indexType = indexEntry->getIndexType();
67 indexStats.isPrimary = indexEntry->getIndexName() == InternalKeyword::ID;
68 for (const auto propertyID : indexEntry->getPropertyIDs()) {
69 indexStats.columnIDs.push_back(tableEntry.getColumnID(propertyID));
70 }
71 plannerStats.indexStats.push_back(std::move(indexStats));
72 }
73}
74
75PlannerTableStats buildPlannerTableStats(StorageManager& storageManager, const Catalog& catalog,
76 const Transaction* transaction, const TableCatalogEntry& tableEntry, table_id_t physicalTableID,

Callers 1

buildPlannerTableStatsFunction · 0.85

Calls 4

getIndexEntriesMethod · 0.80
getIndexTypeMethod · 0.45
push_backMethod · 0.45
getColumnIDMethod · 0.45

Tested by

no test coverage detected