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

planner/infoschema: add predicate pushdown for system tables #50779

Merged
merged 21 commits into from
Feb 1, 2024

Conversation

ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Jan 29, 2024

What problem does this PR solve?

Issue Number: ref #50305

Problem Summary:
See issue.

What changed and how does it work?

  1. collect predicates on infoschema.tables(statistics,KEY_COLUMN_USAGE,REFERENTIAL_CONSTRAINTS)
  2. filter when doing memtable retrieve
  3. do column pruning when read infoschema.tables to avoid updating statscache.

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.

In cluster with 17w+ tables
image

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 do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 29, 2024
Copy link

tiprow bot commented Jan 29, 2024

Hi @ywqzzy. 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/test-infra repository.

@ywqzzy ywqzzy changed the title planner/infoschema: add predicate pushdown for some table [WIP]planner/infoschema: add predicate pushdown for some table Jan 29, 2024
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 29, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Merging #50779 (25e977b) into master (7087f70) will increase coverage by 2.3560%.
Report is 30 commits behind head on master.
The diff coverage is 82.1428%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #50779        +/-   ##
================================================
+ Coverage   70.5545%   72.9105%   +2.3560%     
================================================
  Files          1465       1468         +3     
  Lines        433455     438245      +4790     
================================================
+ Hits         305822     319527     +13705     
+ Misses       108436      98784      -9652     
- Partials      19197      19934       +737     
Flag Coverage Δ
integration 49.3769% <82.1428%> (?)
unit 70.4749% <75.0000%> (+0.1020%) ⬆️

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

Components Coverage Δ
dumpling 54.1120% <ø> (ø)
parser ∅ <ø> (∅)
br 51.2778% <ø> (+5.5089%) ⬆️

@ywqzzy ywqzzy changed the title [WIP]planner/infoschema: add predicate pushdown for some table [WIP]planner/infoschema: add predicate pushdown for system tables Jan 29, 2024
@ywqzzy ywqzzy changed the title [WIP]planner/infoschema: add predicate pushdown for system tables planner/infoschema: add predicate pushdown for system tables Jan 29, 2024
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 29, 2024
Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

@hawkingrei
Copy link
Member

/ok-to-test

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Jan 30, 2024

/retest

@ywqzzy ywqzzy requested a review from AilinKid January 31, 2024 08:17
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Feb 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, Benjamin2037

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:
  • OWNERS [AilinKid,Benjamin2037]

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

Copy link

ti-chi-bot bot commented Feb 1, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-29 09:38:53.813296255 +0000 UTC m=+1385575.377593959: ☑️ agreed by Benjamin2037.
  • 2024-02-01 07:28:37.343549614 +0000 UTC m=+1636958.907847341: ☑️ agreed by AilinKid.

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Feb 1, 2024

/retest

1 similar comment
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Feb 1, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit efe8523 into pingcap:master Feb 1, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test release-note-none size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants