Note that if you set pragma temp_store to memory (or the compile time option to memory only) then all the sorter data is stored only in memory. I can attest that this is true because creating an index or using a sorter that exceeds the amount of virtual memory available causes the process to terminate with an OOM error.