Extend 'A Practical Guide For SQL Tuning' with table partitioning
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 617
- Forks
- 724
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 223
Description
Change Request
Please answer the following questions before submitting your issue. Thanks!
-
Describe what you find is inappropriate or missing in the existing docs.
As a follow up to #19108, also write a part where table partitioning is explained and what its best practice can be used for SQL tuning -
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.
- Provide some reference materials (such as documents and websites) if you could.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the existing “A Practical Guide For SQL Tuning” page and review the context from issue #19108 before planning the addition. Cover partition pruning, DROP PARTITION, EXCHANGE PARTITION, non-global secondary-index drawbacks, and global-index trade-offs; the documentation is done when each requested benefit, limitation, and use case is explained accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, documentation, performance
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100