Skip to content
Snippets Groups Projects
Commit 79d86301 authored by Johannes Mey's avatar Johannes Mey
Browse files

fix lookup time computation of direct/indirect access path; add attribute stats debug message

parent 600ebf12
No related branches found
No related tags found
No related merge requests found
...@@ -296,14 +296,24 @@ public class ERISConnector { ...@@ -296,14 +296,24 @@ public class ERISConnector {
// first prerequisite: there has to be a proposed index // first prerequisite: there has to be a proposed index
if (currentIndexConfigs.containsKey(attribute)) { if (currentIndexConfigs.containsKey(attribute)) {
ERISAttributeStatistics as = livingPartition.getAttributeStatistics(attribute);
logger.debug(" attribute {} stats: lookups: {} inserts: {} scans: {} links: {} count: {}",
attribute.getName(),
as.getLookups(),
as.getInserts(),
as.getScans(),
as.getLinks(),
as.getCount());
// get the proposed index // get the proposed index
ERISLPConfiguration newIndexConfig = currentIndexConfigs.get(attribute); ERISLPConfiguration newIndexConfig = currentIndexConfigs.get(attribute);
// compute the missing component of the score for the index config // compute the missing component of the score for the index config
// get the lookup time // get the lookup time
int count = livingPartition.getAttributeStatistics(attribute).getCount();
int lookupCount = livingPartition.getAttributeStatistics(attribute).getLookups(); int lookupCount = livingPartition.getAttributeStatistics(attribute).getLookups();
double lookupTime = newDOrOConfig.getAccessPath().getLookupTime(lookupCount); double lookupTime = newDOrOConfig.getAccessPath().getLookupTime(count);
double indexScore = newIndexConfig.getEstimatedCost().orElse(Double.MAX_VALUE); double indexScore = newIndexConfig.getEstimatedCost().orElse(Double.MAX_VALUE);
double lookupScoreWithoutIndex = lookupTime * lookupCount; double lookupScoreWithoutIndex = lookupTime * lookupCount;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment