Pergunta de entrevista da empresa Oracle

How would you implement an RDBMS optimizer?