I am using mysql and there are two queries running on the slave. One thread is a slave replication thread and it is doing inserts. Another thread is a select query. The select query is running for more than 6-7 hours and mostly in "Copying to tmp table" status.
I am working on optimizing the query. Are there any configuration related improvements?