Use unlogged staging table instead of temp table