Recently, we learned an expensive lesson about MySQL partition pruning. There, it is better to share it here so that others will not repeat our mistake. Background In our system, there is a big stats table that does not have primary key and indexes. This table is partitioned, but the lack of indexes often causes ...