A system, method, and program for improving the performance for SQL queries. Multidimensional metadata associated with a cube model metadata object is obtained. One or more summary tables to be built are automatically identified based on the obtained multidimensional metadata. One or more indexes to create are automatically identified based on the obtained multidimensional metadata.