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

Provide an API that explains the query execution plan #3001

Closed
aleks-p opened this issue Feb 12, 2024 · 0 comments · Fixed by #3276
Closed

Provide an API that explains the query execution plan #3001

aleks-p opened this issue Feb 12, 2024 · 0 comments · Fixed by #3276
Labels
backend Mostly go code

Comments

@aleks-p
Copy link
Contributor

aleks-p commented Feb 12, 2024

It can be beneficial to have feature similar to SQL EXPLAIN, where a user, developer or an administrator can get an idea of how a particular query is executed. It could provide information such as

  • the components involved (number of queriers, ingesters, store-gateways)
  • the number of blocks that will be accessed by each component
  • the (total) size of the blocks, number of series and profiles
  • whether deduplication will happen or not

Usage:

  • Can be called by a frontend before running a query to give the user an idea of how the query would be executed (similar to how Loki shows how much data would be processed by a query)
  • Can be used to warn the users for potentially slow queries
  • Can be used to provide suggestions on how to improve a query (e.g., based on Create config setting to customize an environment for querying #2796, or changing max nodes).
  • Could be visualized in a node graph

Notes / considerations:

  • Today this kind of analysis is done using tracing, which can be challenging for large traces
@aleks-p aleks-p added the backend Mostly go code label Feb 12, 2024
@aleks-p aleks-p changed the title Provide an API that explains the query execution Provide an API that explains the query execution plan Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Mostly go code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant