Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5394

Optimize query planning for MapR-DB tables by caching row counts

    XMLWordPrintableJSON

    Details

      Description

      On large MapR-DB tables, it was observed that the query planning time was longer than expected. With DEBUG logs, it was understood that there were multiple calls being made to get MapR-DB region locations and to fetch total row count for tables.

      2017-02-23 13:59:55,246 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.s.m.d.b.BinaryTableGroupScan - Getting region locations
      2017-02-23 14:00:05,006 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.planner.logical.DrillOptiq - Function
      ...
      2017-02-23 14:00:05,031 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.s.m.d.b.BinaryTableGroupScan - Getting region locations
      2017-02-23 14:00:16,438 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.planner.logical.DrillOptiq - Special
      ...
      2017-02-23 14:00:16,439 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.s.m.d.b.BinaryTableGroupScan - Getting region locations
      2017-02-23 14:00:28,479 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.planner.logical.DrillOptiq - Special
      ...
      2017-02-23 14:00:28,480 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.s.m.d.b.BinaryTableGroupScan - Getting region locations
      2017-02-23 14:00:42,396 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.planner.logical.DrillOptiq - Special
      ...
      2017-02-23 14:00:42,397 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.s.m.d.b.BinaryTableGroupScan - Getting region locations
      2017-02-23 14:00:54,609 [27513143-8718-7a47-a2d4-06850755568a:foreman] DEBUG o.a.d.e.p.s.h.DefaultSqlHandler - VOLCANO:Physical Planning (49588ms):
      

      We should cache these stats and reuse them where all required during query planning. This should help reduce query planning time.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ppenumarthy Padma Penumarthy
                Reporter:
                agirish Abhishek Girish
                Reviewer:
                Gautam Parai
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: