Tip: Increasing work_mem can reduce or eliminate temporary file usage for sorts and hash operations, but it should not be the first thing you reach for. If the query is sorting, hashing, or joining millions of unnecessary rows, a better index or query shape may reduce the work far more effectively than giving the same plan more memory. For more details, see Tuning work_mem in YugabyteDB.