I have a temporary table that could send large result sets. Is it more expensive to send large result sets OR the actual creation of the table. (10,000+ row result sets)
My server got overloaded and a lot of the queries in the process list said either
- "Sending data"
- "Copying to tmp table"
I have added LIMIT and OFFSET for the query against the temporary table, so that should help the sending data part.
What is worse...The creation of a temporary table that is an expensive query....or sending the whole entire temporary table in a simple select? (They both seem pretty bad)