MySQL database takes too long to load page first time
in the case of MySQL 5.6 until 8.0, innodb is ready for caching after you restart or start MySQL server with innodb_buffer_pool_dump_now and innodb_buffer_pool_load_now, with this you could save pages cached into buffer pool and then you could load again, avoiding a query takes too long of time to load 

Regards