Cover the exterior roof decking with 4-by-8-foot foam board panels and place loose fill insulation between the joists in the attic. Use extruded polystyrene on the decking for the best combination of high heat resistance and strength; install it with a vapor barrier face down, on the decking. Use blown-in cellulose in the attic space, the best choice for heat resistance and economy.
Build the roof with structural insulated panels to combine insulation material and roof decking. Pick panels of an appropriate thickness; they are made with oriented strand board on both sides of some thick foam board insulation. Install panels on top of the roof rafters or top chords of trusses. The method of fastening will vary with the manufacturer and the thickness of the panel.
Use spray foam insulation, typically a polyurethane product, on the insides of roof rafters. Combine spray foam inside rafters with exterior rigid foam board for maximum insulation; spray foam has the highest per-inch heat resistance of any insulating material, but may need professional installation since it requires special equipment.
Combine materials to achieve a desired total heat resistance or R value. The North American Insulation Manufacturers Association recommends a minimum of R 30 to R 38 for most of the United States. That equates to 1 1/2 inches of rigid foam board and 10 to 12 inches of cellulose, but check manufacturers of structural panels and spray foam for specifics on other types of roof insulation.