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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

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:159.9µs, close:26.1µs, loops:993, RU:232943.15, build_hash_table:{concurrency:5, total:2.24s, fetch:1.2s, partition:4.67s, max_partition:939.2ms, build:341.3ms, max_build:101.1ms}, probe:{concurrency:5, total:13s, max:13s, probe:10s, fetch_and_wait:2.94s, probe_collision:59203192}, 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:529.1ms, open:73.7µs, close:14.6µs, loops:14668, cop_task: {num: 379, max: 58.5ms, min: 194.1µs, avg: 29.9ms, p95: 50.9ms, max_proc_keys: 50144, p95_proc_keys: 50144, tot_proc: 10.9s, tot_wait: 21.9ms, copr_cache_hit_ratio: 0.07, build_task_duration: 26.6µs, max_distsql_concurrency: 10}, rpc_info:{Cop:{num_rpc:379, total_time:11.3s}}                                                                                                                                        | data:TableFullScan_11                                                                               | 3.07 MB | N/A     |
| │ └─TableFullScan_11        | 15615424.00 | 15000000 | cop[tikv] | table:orders   | tikv_task:{proc max:57ms, min:0s, avg: 27.7ms, p80:38ms, p95:48ms, iters:16165, tasks:379}, scan_detail: {total_process_keys: 14925888, total_process_keys_size: 2266487226, total_keys: 14926239, get_snapshot_time: 12.3ms, rocksdb: {key_skipped_count: 14925888, block: {cache_hit_count: 76865}}}, time_detail: {total_process_time: 10.9s, total_suspend_time: 21.8ms, total_wait_time: 21.9ms, total_kv_read_wall_time: 10.4s, tikv_wall_time: 11s}                                  | keep order:false                                                                                    | N/A     | N/A     |
| └─TableReader_14(Probe)     | 59986052.00 | 59986052 | root      |                | time:568ms, open:68.5µs, close:3.8µs, loops:58643, cop_task: {num: 1605, max: 66.6ms, min: 305.3µs, avg: 27.6ms, p95: 50ms, max_proc_keys: 50144, p95_proc_keys: 50144, tot_proc: 43s, tot_wait: 96.2ms, copr_cache_hit_ratio: 0.00, build_task_duration: 46.7µs, max_distsql_concurrency: 15}, rpc_info:{Cop:{num_rpc:1605, total_time:44.2s}}                                                                                                                                             | data:TableFullScan_13                                                                               | 4.39 MB | N/A     |
|   └─TableFullScan_13        | 59986052.00 | 59986052 | cop[tikv] | table:lineitem | tikv_task:{proc max:65ms, min:0s, avg: 26ms, p80:36ms, p95:47ms, iters:64976, tasks:1605}, scan_detail: {total_process_keys: 59975940, total_process_keys_size: 11761091416, total_keys: 59977541, get_snapshot_time: 48.2ms, rocksdb: {key_skipped_count: 59975940, block: {cache_hit_count: 378694}}}, time_detail: {total_process_time: 43s, total_suspend_time: 89.5ms, total_wait_time: 96.2ms, total_kv_read_wall_time: 41.8s, tikv_wall_time: 43.3s}                                 | keep order:false                                                                                    | N/A     | N/A     |
+-----------------------------+-------------+----------+-----------+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+---------+---------+
5 rows in set (13.35 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

ti-chi-bot bot commented Feb 20, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign winoros for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

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 52.63158% with 36 lines in your changes missing coverage. Please review.

Project coverage is 73.3623%. Comparing base (baebf84) to head (ffc4f44).
Report is 13 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59668        +/-   ##
================================================
+ Coverage   72.9990%   73.3623%   +0.3632%     
================================================
  Files          1694       1699         +5     
  Lines        468661     472537      +3876     
================================================
+ Hits         342118     346664      +4546     
+ Misses       105477     104811       -666     
+ Partials      21066      21062         -4     
Flag Coverage Δ
integration 42.7857% <52.6315%> (?)

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

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

@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.

Copy link

ti-chi-bot bot commented Feb 21, 2025

@xzhangxian1008: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/unit-test ffc4f44 link true /test unit-test
idc-jenkins-ci-tidb/check_dev_2 ffc4f44 link true /test check-dev2

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
2 participants