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

chore(planner): add more execution information in system.query_profile #11876

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

leiysky
Copy link
Contributor

@leiysky leiysky commented Jun 27, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Part of #11874

Add the following information to the query profile:

  • input rows and bytes of an operator
  • output rows and bytes of an operator
mysql> select * from system.query_profile;
+--------------------------------------+-------------+---------------+-------------------+----------------------------------------------------------------------------------------------------------------+--------------------------------+
| query_id                             | operator_id | operator_type | operator_children | execution_info                                                                                                 | operator_attribute             |
+--------------------------------------+-------------+---------------+-------------------+----------------------------------------------------------------------------------------------------------------+--------------------------------+
| 656edd6b-1e94-4b30-8416-a1db460e3ca3 |           0 | TableScan     | []                | {"input_bytes":0,"input_rows":0,"output_bytes":0,"output_rows":0,"process_time":0}                             | {"qualified_name":"default.t"} |
| 656edd6b-1e94-4b30-8416-a1db460e3ca3 |           1 | EvalScalar    | [0]               | {"input_bytes":400000,"input_rows":100000,"output_bytes":1200000,"output_rows":100000,"process_time":2.585958} | {"scalars":"t.a (#0) + 1"}     |
+--------------------------------------+-------------+---------------+-------------------+----------------------------------------------------------------------------------------------------------------+--------------------------------+
2 rows in set (0.01 sec)
Read 2 rows, 531.00 B in 0.003 sec., 603.36 rows/sec., 156.44 KiB/sec.

For some operators, for example, Join, Aggregate, and Sort, we cannot collect the execution information correctly yet. They will be supported later.

@vercel
Copy link

vercel bot commented Jun 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
databend ⬜️ Ignored (Inspect) Jun 27, 2023 7:57am

@mergify mergify bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Jun 27, 2023
@leiysky leiysky force-pushed the profile-collector branch from 89e71b5 to ca22dd4 Compare June 27, 2023 07:57
@leiysky leiysky requested a review from andylokandy June 27, 2023 07:57
@leiysky leiysky merged commit 72da05c into databendlabs:main Jun 27, 2023
@leiysky leiysky deleted the profile-collector branch June 27, 2023 11:39
andylokandy pushed a commit to andylokandy/databend that referenced this pull request Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-chore this PR only has small changes that no need to record, like coding styles.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants