Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
Can you paste the query code? Hopefully, then it will get moved to SO. – soandos Jul 25 '11 at 20:30
Would help to know what the query is and the schema. Use indexes. Make sure joins use indexes. Give as much memory as you can. Use /dev/shm for temp tables. Stop the slave while running the query. Google for mysql performance optimization. – Andy Lee Robinson Jul 26 '11 at 4:43

closed as not a real question by random Jul 25 '11 at 20:37

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

Browse other questions tagged or ask your own question.