Optimization paramters read-only mysql 5.7 database?
I can think of several things that might help.  But I can't be specific without seeing that query, plus SHOW CREATE TABLE.

If we can shrink the table/index size, there might be less I/O.  If the index involves a UUID, then I will have lots to say.

Sometimes rearranging the index(es) helps.

If you are not using InnoDB, we need to discuss that.

Let's see SHOW GLOBAL STATUS; and SHOW VARIABLES; -- there are some metrics that will say how well the Query cache is doing, info about connections, whether the buffer_pool is adequately big, plus other things that might give clues.

In general, "you can't tune your way out of a performance problem."

For "readonly", add this to the config file:

read_only = ON


but I doubt if it will impact the performance.