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

[Bug] Extremely long MetricFlow query times #1557

Open
2 tasks done
siljamardla opened this issue Nov 30, 2024 · 0 comments
Open
2 tasks done

[Bug] Extremely long MetricFlow query times #1557

siljamardla opened this issue Nov 30, 2024 · 0 comments
Labels
bug Something isn't working triage Tasks that need to be triaged

Comments

@siljamardla
Copy link

siljamardla commented Nov 30, 2024

Is this a new bug in metricflow?

  • I believe this is a new bug in metricflow
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Saved query with ~80 metrics. Most of them derived metrics (ratios or averages).

mf query --explain --start-time '2000-01-01' --end-time '2000-01-01' --saved-query my_saved_query > some_output_file.sql

consistently takes 4-5 minutes to compile the SQL.

Expected Behavior

I would expect SQL to be compiled in seconds, if not sub-seconds.

Steps To Reproduce

Define a large enough set of metrics and try compiling the SQL with --explain.

Use case

My current use case is to compile SQL for creating 3 x 6 tables on a combination of geographical (city, country, global) and time (hour, day, week, month, quarter, year) grains. Before you ask why I don't use the metrics dynamically, I want to stress, there are specific reporting purposes why we want to create those tables beforehand and not scan HUGE tables at query time. If I want to add, remove or update a metric in that SQL, this becomes 3 x 6 x 4 = 72 minutes!

Relevant log output

No response

Environment

- OS: mac os
- Python: 3.11
- dbt: 1.8 (core!)
- metricflow: 0.206.0

Which database are you using?

other (mention it in "Additional Context")

Additional Context

Database: Databricks

@siljamardla siljamardla added bug Something isn't working triage Tasks that need to be triaged labels Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Tasks that need to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant