max. depth correction and set PRAGMA temp_store = MEMORY