Selection Guide · Databases
Choose Table Partitioning: Range, List, Hash or Unpartitioned
Partitioning divides a large table into logical pieces; it does not automatically accelerate every query. Pruning excludes pieces based on predicates. Queries omitting the partition key…
Technical review:
Architecture and operating model
Partitioning divides a large table into logical pieces; it does not automatically accelerate every query. Pruning excludes pieces based on predicates. Queries omitting the partition key may scan all partitions and increase planning overhead.
Range can suit time-based retention, list bounded business categories and hash balanced distribution. Volume alone is insufficient; dominant queries, uniqueness, foreign keys and maintenance windows matter. Check engine-version constraints.
Plan future partitions and late-arriving data for time-based designs. Monitor uncontrolled growth in any default partition. Detach/drop can simplify retention but does not replace independent backup or approved deletion.
- 1Queries/retention
- 2Key/granularity
- 3Pruning/indexes
- 4Maintenance/acceptance
Design parameters
- Query pattern
- Check whether filters, joins and uniqueness align with the partition key.
- Partition count
- Balance daily/monthly granularity against planning overhead and retention.
- Maintenance
- Test automated creation, attach/detach, indexing and statistics.
Platform implementation
Service names are reference points. Scope, defaults, region availability and operating requirements differ; they are not interchangeable guarantees.
| Model | Suitable pattern | Risk |
|---|---|---|
| Range | Time/range filters | Missing future partitions |
| List | Bounded discrete categories | Growing category count |
| Hash | Key-based distribution | Retention may not align with partitions |
| Unpartitioned | Moderate table/suitable indexes | Large maintenance/deletion costs |
Worked example
Two years of daily events yield 24 monthly or approximately 730 daily partitions. Monthly queries/retention may favor simpler monthly partitioning, without guaranteeing performance. Verify pruning in EXPLAIN and preserve application uniqueness rules.
Troubleshooting
| Observation | Likely cause / distinction | Verification |
|---|---|---|
| Partitioned but scan unchanged | Filter omits key or cannot enable pruning. | Inspect EXPLAIN and scanned child tables. |
| New-day inserts fail | Future partition missing. | Check partition bounds and scheduler success. |
Acceptance checks
- Identify dominant queries.
- Verify key/uniqueness compatibility.
- Demonstrate pruning with EXPLAIN.
- Test future partition creation.
- Test late-arriving data.
- Plan retention/recovery together.
Related concepts
Indexes and execution plans
An index can reduce scanned data for suitable queries, but adds write, maintenance and storage costs. Evaluate column order, selectivity, filters and sorting together. Slow queries are not always caused by missing indexes: estimates, locks, storage latency or excessive data transfer may dominate. Inspect representative execution plans and actual row counts. Measure read improvement alongside write overhead, and avoid uncontrolled production maintenance.
Capacity and usable headroom
Raw capacity is not the capacity available to applications. RAID or erasure coding, filesystems, reserved space, metadata, snapshots and growth headroom are separate deductions. TB and TiB representations also change the displayed number. Write calculations with units, establish protected usable capacity, then subtract operating reserves. Track growth rate as well as current utilization. The projected exhaustion date should leave enough time to procure and deploy additional capacity.
Latency distribution
Latency is the time between starting an operation and receiving its result. An average can hide a small number of very slow operations; medians and p95/p99 percentiles answer different questions. Network RTT, storage waits, processor queues and application processing contribute to end-to-end time. State whether measurements come from the client or server. Check whether increases coincide with traffic growth, maintenance or capacity limits. Record normal and peak-hour baselines before selecting an alert threshold.
Retention and capacity
Retention defines which recovery points are kept and for how long. Daily, weekly and monthly points do not represent identical change patterns; full-copy creation and chain dependencies affect physical capacity. Retention decisions combine business requirements, applicable obligations and technical capacity. Longer retention does not automatically provide better recovery: the right point must be discoverable and readable. When changing a policy, test whether existing points are deleted immediately or handled differently by the product.
Transaction boundary
A transaction groups operations that an application treats as jointly successful or failed. Database atomicity does not automatically include email delivery or changes in other services. Define the commit point and retry behaviour. Evaluate idempotency to prevent processing the same request twice. Test connection loss before and after commit separately: a client-side error does not always mean the transaction failed.
Version and support lifecycle
Installability does not prove production support. Review the compatibility chain across OS, application, drivers, extensions and management tools. Update plans should record version, support end, restart needs and rollback methods. An unrepresentative test environment can produce misleading results. Validate service health and existing workflows after a change, not just version numbers. Remember that pinning a version can also prevent future security fixes.
Primary documentation
Prepared by the Doz Teknoloji technical team using the primary references below. Calculations and lab scenarios state their assumptions; validate the applicable product version before rollout.