[ https://issues.apache.org/jira/browse/DRILL-5429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973577#comment-15973577 ]
ASF GitHub Bot commented on DRILL-5429: --------------------------------------- Github user gparai commented on a diff in the pull request: https://github.com/apache/drill/pull/817#discussion_r112072733 --- Diff: contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/JsonTableGroupScan.java --- @@ -106,7 +115,11 @@ private void init() { Configuration conf = new Configuration(); Table t = MapRDB.getTable(scanSpec.getTableName()); TabletInfo[] tabletInfos = t.getTabletInfos(scanSpec.getCondition()); - tableStats = new MapRDBTableStats(conf, scanSpec.getTableName()); + + // Fetch tableStats only once and cache it. + if (tableStats == null) { --- End diff -- This can probably be removed if we call clone(). However, it may be a useful check if we end up calling it from some other code-paths. Maybe add some logging to ensure we are not recreating the tableStats? > Cache tableStats per query for MapR DB JSON Tables > -------------------------------------------------- > > Key: DRILL-5429 > URL: https://issues.apache.org/jira/browse/DRILL-5429 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization, Storage - MapRDB > Affects Versions: 1.10.0 > Reporter: Padma Penumarthy > Assignee: Padma Penumarthy > Fix For: 1.11.0 > > > For MapR DB JSON Tables, cache (per query) and reuse tableStats. Getting > tableStats is an expensive operation. Saving it and reusing it helps reduce > query latency. -- This message was sent by Atlassian JIRA (v6.3.15#6346)