I have a ~100GB MySQL table with nearly 1 billion rows. It only has 8 columns, one of which being an indexed DateTime that’s used for most of the lookups via thinly sliced “BETWEEN” queries.
Previously my index on this column worked great… but as the table continued to grow, suddenly the index just stopped working. Now EXPLAIN shows “using filesort” on all queries, and I’ve raised all applicable my.conf values for memory pools to no avail.
Is there a max on what a key can handle? Would something like partitioning resolve this?
Any insight would be appreciated. Thanks!
If you are able, stop mysql server, and then go to your data folder and execute
or
that should repair your table. You can also try with
more info here and here