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

Add LIMIT push down rule for relational database sources

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage - Other
    • Labels:
      None

      Description

      Hi,

      It will be very useful if queries with LIMIT or OFFSET clauses could be translated to native SQL when using relational databases as input.

      Supose that I have a mysql connection configured. Right now, if I execute:

      select * from mysql.schema.table LIMIT 1

      This will be translated into:

      select * from schema.table

      And executed in the relational database server. As you can see, all the rows will be retrieved from the table. Then, apache drill will filter the result and show only one row.

      The problem is that this is a huge performance penalty that can be avoided translating the query having this into account.

      I'm not quite sure if this is a mysql problem or all the relational database sources share the same limitation. So, excuse me if I open this issue as a feature request.

      Regards

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              danielsan_etg daniel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: