Adding temporary tables for substructure searches