Storing Intermediate Results in Space and Time: SQL Graphs and Block Referencing