The server should really only be writing to the temp file when it absolutely must do so because the cache is full. You're probably better off taking the memory you would reserve for your RAM disk and just add it to your cache size.
You also run the risk of running out of space on your RAM disk if the server decides to write, for example, a very large intermediate result set. If you run out of space, the server will either abort the query or report a fatal error.
answered 02 Mar '11, 20:42