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

Add '--show-stats' to 'influxdb3 query' #25970

Open
sanderson opened this issue Feb 5, 2025 · 1 comment
Open

Add '--show-stats' to 'influxdb3 query' #25970

sanderson opened this issue Feb 5, 2025 · 1 comment

Comments

@sanderson
Copy link
Contributor

It would be nice to have the option to return some query execution statistics when using the influxdb3 query command. This would be set to false by default, but when enabled, it would output query statistics to stdout. For example:

> influxdb3 query --database my-db --show-stats 'select * from table'
#...<query results>

Query statistics
----------------
plan_duration: ...
permit_duration: ...
execute_duration: ...
end2end_duration: ...
compute_duration: ...
max_memory: ...

Use case:
This would help to easily see execution stats of single queries and provide an alternative to having to query stats from system tables.

Alternatives considered:
DataFusion outputs query durations in their REPL, so I believe at least some of this data is available at query time. AFAIK, this functionality isn't exposed in a usable way.

@sanderson
Copy link
Contributor Author

sanderson commented Feb 5, 2025

I would also propose that if results are written to a file, the statistics would still only be output on the command line and not included with query results in the output file.

@sanderson sanderson changed the title Add '--show-stats' to `influxdb3 query' Add '--show-stats' to 'influxdb3 query' Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant