> [!BufFileWrite] > <table><tr><td rowspan="4" width="25%"><img src="assets/wl_io_buffilewrite.png"></td><td><b>Wait Category</b></td><td>IO</td></tr><tr><td><b>Mechanism</b></td><td><code>BufFileWrite</code></td></tr><tr><td><b>Operations</b></td><td><a href="Operations/ResultSet/Sort">Sort</a>, <a href="Operations/ResultSet/HashJoin">HashJoin</a>, <a href="Operations/ResultSet/Materialize">Materialize</a></td></tr><tr><td><b>Resources</b></td><td><a href="Resources/disk IO">disk IO</a>, <a href="Resources/CPU">CPU</a></td></tr><tr><td colspan="3"><b>On-Disk Query Execution Overhead</b>. When the dataset for a sort or a join cannot fit entirely within the session's private memory, the engine must "spill" the overflowing data to unbuffered temporary files.</td></tr></table>