How are database statistics obtained?

 What database statistics measurements are typical of tables, indexes, and resources?

  How is the processing of SQL DDL statements (such as CREATE TABLE) different from the processing required by DML statements?

 In simple terms, the DBMS processes a query in three phases. What are the phases, and what is accomplished in each phase?

  If indexes are so important, why not index every column in every table? (Include a brief discussion of the role played by data sparsity.)

 What is the difference between a rule-based optimizer and a cost-based optimizer?