[ 
https://issues.apache.org/jira/browse/DRILL-8491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Piyush Shama updated DRILL-8491:
--------------------------------
    Priority: Critical  (was: Major)

> MongoDB | Queries Conversion optimisation & using various mongoDB features
> --------------------------------------------------------------------------
>
>                 Key: DRILL-8491
>                 URL: https://issues.apache.org/jira/browse/DRILL-8491
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Piyush Shama
>            Priority: Critical
>
> {*}Title{*}: Inefficient Query Translation and Underutilised Functions in SQL 
> to MongoDB Conversion Using Apache Drill
> {*}Description{*}: We have been experiencing significant performance issues 
> when using Apache Drill to convert SQL queries for use with MongoDB. It 
> appears that the SQL to MongoDB query translation process is not optimally 
> executed, leading to inefficient query operations and slow response times.
> {*}Details{*}:
>  # {*}Inefficient Query Translation{*}:
>  ** The translation of SQL queries into MongoDB-specific queries by Apache 
> Drill seems sub optimal. This inefficiency is particularly noticeable with 
> complex queries, where the expected execution plan does not align with 
> MongoDB's capabilities, resulting in slower query performance.
>  # {*}Underutilization of MongoDB Capabilities{*}:
>  ** Several MongoDB functionalities are not being fully utilised in the 
> translation process:
>  *** {*}Aggregation Operations{*}: Functions like {{{}SUM(){}}}, 
> {{{}AVG(){}}}, {{{}MIN(){}}}, and {{MAX()}} are either poorly translated or 
> not utilised, leading to potential performance degradation.
>  *** {*}Date Handling{*}: Extraction of date components (e.g., day from an 
> ISO date) within queries is not handled efficiently, forcing additional 
> processing overhead or client-side computations.
>  *** {*}Count Queries{*}: Simple count operations are not optimised, possibly 
> translating into more complex query forms than necessary.
> {*}Impact{*}: The current issues significantly affect the performance and 
> scalability of applications relying on Apache Drill for interacting with 
> MongoDB, particularly in data-heavy environments.
> {*}Expected Behaviour{*}:
>  * Queries translated from SQL to MongoDB should utilise MongoDB's native 
> query capabilities more effectively, ensuring that operations such as 
> aggregations, date extractions, and counts are executed in the most efficient 
> manner possible.
>  * The translation engine should optimise the query structure to leverage 
> MongoDB's strengths, particularly in handling large datasets.
> {*}Steps to Reproduce{*}:
>  # Set up Apache Drill with a MongoDB data source.
>  # Execute complex SQL queries involving aggregation, date extraction, and 
> count operations.
>  # Observe the generated MongoDB queries and resulting performance.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to