Are there any guidelines for setting innodb_stats_persistent_sample_pages in MySQL?
It's a crap shoot.


Too high --> takes too long; and not necessarily better stats
Too low --> inaccurate stats
Percentage --> 1% is close to hitting every block (for the typical table that has about 100 rows per block).
As table grows, InnoDB allegedly re-ANALYZEs after 10% growth, so no manual action needed.
Most tables have decent stats from 20.
Tables with uneven distribution won't benefit from changing the '20', at least not until some decent "histogram" stats are implemented.  Then, Optimization becomes much more complex, and potentially slower.


Bottom line:  Leave it at 20.  Keep the slowlog on.  Tackle the worst entry in the slowlog, with an eye for solutions that don't depend on the '20'.