Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache Drill Query Execution PLAN Doesn't use mongo db index #2826

Closed
dwevedivaibhav opened this issue Aug 25, 2023 · 3 comments
Closed

Apache Drill Query Execution PLAN Doesn't use mongo db index #2826

dwevedivaibhav opened this issue Aug 25, 2023 · 3 comments
Labels

Comments

@dwevedivaibhav
Copy link

Hi Team,

I am trying to execute the millions of record query from mongo db storage with timestamp filter, it getting slow even though i created the index of timestamp in mongo collection, but its taking so long time to execute and some time time its failing also due to huge record.

Please find the sample query which i am executing from apache drill

select * FROM mongo.sampletable
WHERE SentTime >= TO_TIMESTAMP('2023-08-10 00:00:00', 'yyyy-MM-dd HH:mm:ss')
AND SentTime < TO_TIMESTAMP('2023-08-17 00:00:00', 'yyyy-MM-dd HH:mm:ss')
LIMIT 10

@jnturton
Copy link
Contributor

I wonder if your constant timestamp expressions are being folded by the planner. Do you get the same performance from the next query?

SELECT * FROM mongo.sampletable
WHERE SentTime >= TIMESTAMP '2023-08-10 00:00:00'
AND SentTime < TIMESTAMP '2023-08-17 00:00:00'
LIMIT 10

@dwevedivaibhav
Copy link
Author

Yes Same problem @jnturton

@jnturton jnturton closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@jnturton
Copy link
Contributor

Duplicate of #2906.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants