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

executor: modify some hash join stats #59668

Merged
merged 8 commits into from
Feb 26, 2025

Conversation

xzhangxian1008
Copy link
Contributor

@xzhangxian1008 xzhangxian1008 commented Feb 20, 2025

What problem does this PR solve?

Issue Number: close #59667

Problem Summary:

What changed and how does it work?

mysql> explain analyze select o_orderkey from orders where exists (select 1 from lineitem where lineitem.l_suppkey = orders.o_custkey);
+-----------------------------+-------------+----------+-----------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+---------+---------+
| id                          | estRows     | actRows  | task      | access object  | execution info                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | operator info                                                                                       | memory  | disk    |
+-----------------------------+-------------+----------+-----------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+---------+---------+
| HashJoin_10                 | 12492339.20 | 999503   | root      |                | time:13.3s, open:135.9µs, close:22.5µs, loops:993, RU:233211.19, build_hash_table:{concurrency:5, time:2.25s, fetch:1.06s, max_partition:1.06s, total_partition:5.27s, max_build:124ms, total_build:439.5ms}, probe:{concurrency:5, time:13s, fetch_and_wait:3.03s, max_worker_time:13s, total_worker_time:1m4.5s, max_probe:9.93s, total_probe:49.4s, probe_collision:59818971}, spill:{round:1, spilled_partition_num_per_round:[5/8], total_spill_GiB_per_round:[1.64], build_spill_row_table_GiB_per_round:[0.50], build_spill_hash_table_per_round:[0.12]}   | semi join, left side:TableReader_12, equal:[eq(tpch10.orders.o_custkey, tpch10.lineitem.l_suppkey)] | 1.02 GB | 1.64 GB |
| ├─TableReader_12(Build)     | 15615424.00 | 15000000 | root      |                | time:449.8ms, open:34.8µs, close:12.7µs, loops:14667, cop_task: {num: 379, max: 68.5ms, min: 638.5µs, avg: 29.4ms, p95: 51.8ms, max_proc_keys: 50144, p95_proc_keys: 50144, tot_proc: 10.6s, tot_wait: 23.3ms, copr_cache_hit_ratio: 0.00, build_task_duration: 12.8µs, max_distsql_concurrency: 10}, rpc_info:{Cop:{num_rpc:379, total_time:11.1s}}                                                                                                                                                                                                              | data:TableFullScan_11                                                                               | 3.83 MB | N/A     |
| │ └─TableFullScan_11        | 15615424.00 | 15000000 | cop[tikv] | table:orders   | tikv_task:{proc max:57ms, min:0s, avg: 26.4ms, p80:35ms, p95:46ms, iters:16165, tasks:379}, scan_detail: {total_process_keys: 15000000, total_process_keys_size: 2277738682, total_keys: 15000379, get_snapshot_time: 9.21ms, rocksdb: {key_skipped_count: 15000000, block: {cache_hit_count: 77840}}}, time_detail: {total_process_time: 10.6s, total_suspend_time: 26.4ms, total_wait_time: 23.3ms, total_kv_read_wall_time: 10s, tikv_wall_time: 10.7s}                                                                                                        | keep order:false                                                                                    | N/A     | N/A     |
| └─TableReader_15(Probe)     | 59986052.00 | 59986052 | root      |                | time:647ms, open:78.8µs, close:2.9µs, loops:58644, cop_task: {num: 1605, max: 65ms, min: 518.6µs, avg: 28ms, p95: 49.2ms, max_proc_keys: 50144, p95_proc_keys: 50144, tot_proc: 43.4s, tot_wait: 103.5ms, copr_cache_hit_ratio: 0.00, build_task_duration: 52.9µs, max_distsql_concurrency: 15}, rpc_info:{Cop:{num_rpc:1605, total_time:45s}}                                                                                                                                                                                                                    | data:TableFullScan_14                                                                               | 4.60 MB | N/A     |
|   └─TableFullScan_14        | 59986052.00 | 59986052 | cop[tikv] | table:lineitem | tikv_task:{proc max:61ms, min:0s, avg: 26.2ms, p80:37ms, p95:47ms, iters:64976, tasks:1605}, scan_detail: {total_process_keys: 59986052, total_process_keys_size: 11763074558, total_keys: 59987657, get_snapshot_time: 40.5ms, rocksdb: {key_skipped_count: 59986052, block: {cache_hit_count: 379150}}}, time_detail: {total_process_time: 43.4s, total_suspend_time: 112.2ms, total_wait_time: 103.5ms, total_kv_read_wall_time: 42.1s, tikv_wall_time: 43.9s}                                                                                                 | keep order:false                                                                                    | N/A     | N/A     |
+-----------------------------+-------------+----------+-----------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+---------+---------+
5 rows in set (13.28 sec)

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 20, 2025
Copy link

tiprow bot commented Feb 20, 2025

Hi @xzhangxian1008. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@xzhangxian1008
Copy link
Contributor Author

/cc @windtalker

@ti-chi-bot ti-chi-bot bot requested a review from windtalker February 20, 2025 07:05
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 21, 2025
Copy link

codecov bot commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 55.26316% with 34 lines in your changes missing coverage. Please review.

Project coverage is 73.7429%. Comparing base (baebf84) to head (776e004).
Report is 39 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59668        +/-   ##
================================================
+ Coverage   72.9990%   73.7429%   +0.7438%     
================================================
  Files          1694       1701         +7     
  Lines        468661     476801      +8140     
================================================
+ Hits         342118     351607      +9489     
+ Misses       105477     104234      -1243     
+ Partials      21066      20960       -106     
Flag Coverage Δ
integration 43.3918% <52.6315%> (?)
unit 72.6593% <55.2631%> (+0.4581%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 44.8411% <ø> (-0.2006%) ⬇️

@xzhangxian1008
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 21, 2025

@xzhangxian1008: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@xzhangxian1008
Copy link
Contributor Author

/retest

@xzhangxian1008
Copy link
Contributor Author

/cc @windtalker @yibin87

@ti-chi-bot ti-chi-bot bot requested a review from yibin87 February 25, 2025 01:49
Copy link

tiprow bot commented Feb 25, 2025

@xzhangxian1008: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@xzhangxian1008
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 25, 2025

@xzhangxian1008: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yibin87
Copy link
Contributor

yibin87 commented Feb 25, 2025

Copy link
Contributor

@yibin87 yibin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 25, 2025
@xzhangxian1008
Copy link
Contributor Author

/cc @windtalker

Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 26, 2025
Copy link

ti-chi-bot bot commented Feb 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-25 06:50:36.774523186 +0000 UTC m=+338584.727681554: ☑️ agreed by yibin87.
  • 2025-02-26 05:22:49.132592713 +0000 UTC m=+419717.085750979: ☑️ agreed by windtalker.

Copy link

ti-chi-bot bot commented Feb 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, windtalker, yibin87

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Feb 26, 2025
@xzhangxian1008
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 26, 2025

@xzhangxian1008: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@xzhangxian1008
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 26, 2025

@xzhangxian1008: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit 8010959 into pingcap:master Feb 26, 2025
24 checks passed
@xzhangxian1008 xzhangxian1008 deleted the refine-hj2-stats branch February 26, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify some hash join stats
5 participants