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

Extend 'A Practical Guide For SQL Tuning' with table partitioning #19578

Open
mjonss opened this issue Dec 4, 2024 · 1 comment
Open

Extend 'A Practical Guide For SQL Tuning' with table partitioning #19578

mjonss opened this issue Dec 4, 2024 · 1 comment

Comments

@mjonss
Copy link
Contributor

mjonss commented Dec 4, 2024

Change Request

Please answer the following questions before submitting your issue. Thanks!

  1. Describe what you find is inappropriate or missing in the existing docs.
    As a follow up to A Practical Guide For SQL Tuning #19108, also write a part where table partitioning is explained and what its best practice can be used for SQL tuning

  2. Describe your suggestion or addition.
    It should mention:

  • Benefits of table partitioning
    • partition pruning can skip all partitions not matching the predicates of the query, also for TiFlash
    • DROP PARTITION very efficient way of deleting a whole partition, similar to DROP TABLE, without having to go through the transaction layer.
    • EXCHANGE PARTITION
  • Drawbacks of table partitioning
    • non-global secondary indexes will do index lookups for each matching partition
  • Global index
    • Remove the limitation that 'all unique indexes needs to include all partitioning columns'
    • A single table level index so not one lookup per partition
    • Needs index reorganization when dropping / reorganizing partitions, so not meta-data only DROP PARTITION.
  1. Provide some reference materials (such as documents and websites) if you could.
@dbsid
Copy link
Contributor

dbsid commented Dec 5, 2024

We're prepare a dedicated best practice document for partition table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants