A common technique used in data warehouse is prior computation and store results of some frequent SQl’s. This is useful when the queries are involved in aggregations, because the result is much smaller than the detailed information.
For example:- Users are much interested in total sales of each product for each month.
To get this result, selected data would be joined, sorted, and aggregated for every user. The result can be obtained by adding the months for that year.
Rather than re-executing the same query multiple times, the result could be pre-computed and saved in a table (Summary tables). Generally, these tables are much smaller than the detailed data tables. Depend on data, the reduction in size and therefore performance of the query will also improved.