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

TiFlash table scan performance gain after mpp column prune enhancement #8962

Closed
JaySon-Huang opened this issue Apr 18, 2024 · 1 comment · Fixed by #8987
Closed

TiFlash table scan performance gain after mpp column prune enhancement #8962

JaySon-Huang opened this issue Apr 18, 2024 · 1 comment · Fixed by #8987
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/compute severity/moderate type/bug The issue is confirmed as a bug.

Comments

@JaySon-Huang
Copy link
Contributor

JaySon-Huang commented Apr 18, 2024

General Question

Ref pingcap/tidb#52143

After pingcap/tidb#52143, the tpc-ds 50 query-72 TableScan cost changed. The total query time of query-72 changed from 5.71s to 3.72s, and the TableScan of catalog_sales changed from 3.21s to 1.72s.

However, the data bytes read from Storage layer does not affected. We need to investigate why the cost of "TableScan" is changed.

@JaySon-Huang
Copy link
Contributor Author

The reason is cpu_pending_time is shortened in the new execution plan. However, it is added to the time cost of TableScan.

# old execution plan
[2024/04/25 14:57:19.520 +08:00] [DEBUG] [PipelineExecutor.cpp:111] ["query finish with {\"cpu_execute_time_ns\":13909293292,\"cpu_pending_time_ns\":218585609025,\"io_execute_time_ns\":0,\"io_pending_time_ns\":0,\"await_time_ns\":113212387136,\"wait_for_notify_time_ns\":1879039619}"] [source="MPP<gather_id:1, query_ts:1714028234464527835, local_query_id:3, server_id:1877, start_ts:449322217487466499,task_id:5>"] [thread_id=765]

# new execution plan
[2024/04/25 15:01:04.085 +08:00] [DEBUG] [PipelineExecutor.cpp:111] ["query finish with {\"cpu_execute_time_ns\":13648277584,\"cpu_pending_time_ns\":109346223979,\"io_execute_time_ns\":0,\"io_pending_time_ns\":0,\"await_time_ns\":89383817806,\"wait_for_notify_time_ns\":2883058636}"] [source="MPP<gather_id:1, query_ts:1714028460927203570, local_query_id:2, server_id:275, start_ts:449322276849975299,task_id:5>"] [thread_id=779]

@SeaRise SeaRise added affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. labels May 7, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in #8987 May 8, 2024
@JaySon-Huang JaySon-Huang added type/bug The issue is confirmed as a bug. severity/moderate and removed type/question The issue belongs to a question. labels May 8, 2024
ti-chi-bot bot pushed a commit that referenced this issue Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/compute severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants