From 79d86301da49011eb01caa03c99e528b8f7e528c Mon Sep 17 00:00:00 2001 From: Johannes Mey <johannes.mey@tu-dresden.de> Date: Thu, 7 Feb 2019 10:05:51 +0100 Subject: [PATCH] fix lookup time computation of direct/indirect access path; add attribute stats debug message --- .../inf/st/mquat/eris/coupling/ERISConnector.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java b/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java index 4dcc9c2..d021fe1 100644 --- a/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java +++ b/jastadd-mquat-eris/src/main/java/de/tudresden/inf/st/mquat/eris/coupling/ERISConnector.java @@ -296,14 +296,24 @@ public class ERISConnector { // first prerequisite: there has to be a proposed index 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 ERISLPConfiguration newIndexConfig = currentIndexConfigs.get(attribute); // compute the missing component of the score for the index config // get the lookup time + int count = livingPartition.getAttributeStatistics(attribute).getCount(); 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 lookupScoreWithoutIndex = lookupTime * lookupCount; -- GitLab