Oracle Interview Question

How would you implement an RDBMS optimizer?