MySQL PV Log Table Optimization: A Deep Dive into Slashing Storage Costs by 73%
How do you design a high-performance, cost-effective MySQL table for 100,000 daily page views? This article provides a deep dive into a real-world PV log table case study, analyzing the complete optimization process from field selection and indexing strategies to partitioning. This approach is crucial for systems handling large volumes of log data, like the analytics module at wiki.lib00.com, ultimately achieving over a 73% reduction in storage and a significant boost in write performance.
MySQL NULL vs. 0: Which Saves More Space? A Deep Dive with a Billion Rows
In MySQL database design, should you use NULL or 0 to represent 'no value'? This is a classic debate. This article provides a deep dive into the storage space differences between an `INT` field with a NULL value versus a 0, using a one-billion-row case study. You might be surprised to learn that using NULL can save you nearly 4GB of storage in certain scenarios. We will detail MySQL's internal mechanism for storing NULL values and offer trade-off advice regarding performance and query efficiency to help you make optimal design decisions.