You likely have one or more queries that are materializing a large amount of data during their execution and this is causing your temp file to grow. You will need to find the query (or queries) that is the cause.
There is no easy way of finding "run-away" queries.
One method to try is to limit the amount of temp space allowed for each connection and then run your application and wait to see what fails.
To limit the amount of temp space used by a connection, you need to turn on the temp_space_limit_check option and then set the max_temp_space option to the upper limit of the amount of space to be used by a connection.
The above will limit each connection to use a maximum of 100 MB.
See the 11.0.1 documentation for more information.
answered 04 Jan '11, 19:42